Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-12-18, 09:25


fokus123







Wiek: 31
Na forum: 5263 dni
Posty: 10
Nick w MP: Dawid

Piwa: 11

Respekt: 45,3

Mam pro?b?, chcia?bym aby lina uaktywnia?a si? po u?yciu komendy /lina , i aby by?a to komenda w zcmd. Prosz?, je?li z?y dzia? prosz? o przeniesienie !
Tu kod liny:
Kod:

#include <a_samp> //0.3 r7 required
#include <mapandreas> //you have to set it up on your own (see http://gtao.pl.com/index.php?topic=145196.0 )

#define players 500 //maximum of players in your server
#define chopperid 497 //ID of the vehicle model ( http://wiki.sa-mp.com/wiki/Vehicles:Helicopters )
#define ropelength 50 //length of slideable rope (ingame meters)
#define skinid 285 //the skin, who may slide down the rope ( http://wiki.sa-mp.com/wiki/Skins:All )

#define offsetz 12
#define dur 250
#pragma tabsize 0

new r0pes[players][ropelength],Float:pl_pos[players][5]; //cause pvar + array = sux

public OnFilterScriptInit()
{
MapAndreas_Init(MAP_ANDREAS_MODE_FULL);
print("\n--------------------------------------");
print(" <Advanced Rope (v1)> ");
print(" (c) Trooper([Y]) , 2010 (Nicksoft) ");
print("--------------------------------------\n");

return 1;
}

public OnFilterScriptExit()
{
return 1;
}

public OnPlayerConnect(playerid)
{
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
if(GetPVarInt(playerid,"roped") == 1)
{
for(new destr=0;destr<=ropelength;destr++)
{
DestroyObject(r0pes[playerid][destr]);
}
}
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPVarInt(playerid,"roped") == 1)
{
for(new destr2=0;destr2<=ropelength;destr2++)
{
DestroyObject(r0pes[playerid][destr2]);
}
SetPVarInt(playerid,"roped",0);
DisablePlayerCheckpoint(playerid);
}
return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
if(GetVehicleModel(vehicleid) == chopperid)
{
for(new shg=0;shg<=players;shg++)
{
if(GetPVarInt(shg,"chop_id") == vehicleid && GetPVarInt(shg,"roped") == 1)
{
DisablePlayerCheckpoint(shg);
SetPVarInt(shg,"roped",0);
DisablePlayerCheckpoint(shg);
ClearAnimations(shg);
TogglePlayerControllable(shg,1);
for(new destr3=0;destr3<=ropelength;destr3++)
{
DestroyObject(r0pes[shg][destr3]);
}
}
}
}
return 1;
}

forward syncanim(playerid);
public syncanim(playerid)
{
if(GetPVarInt(playerid,"roped") == 0) return 0;
SetTimerEx("syncanim",dur,0,"i",playerid);
ApplyAnimation(playerid,"ped","abseil",4.0,0,0,0,1,0);
return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(vehicleid) == chopperid && ispassenger)
{
SetPVarInt(playerid,"chop_id",GetPlayerVehicleID(playerid));
SetPVarInt(playerid,"roped",0);
}
else SetPVarInt(playerid,"chop_id",0);
return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
if(GetPVarInt(playerid,"roped") == 1 && GetPlayerSkin(playerid) == skinid)
{
SetPVarInt(playerid,"roped",0);
SetPVarInt(playerid,"chop_id",0);
ClearAnimations(playerid);
TogglePlayerControllable(playerid,0);
TogglePlayerControllable(playerid,1);
DisablePlayerCheckpoint(playerid);
for(new destr4=0;destr4<=ropelength;destr4++)
{
DestroyObject(r0pes[playerid][destr4]);
}
}

return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(GetPlayerSkin(playerid) == skinid && GetPVarInt(playerid,"roped") == 0 && GetPlayerVehicleSeat(playerid) != 0 && IsPlayerInAnyVehicle(playerid) && (newkeys & KEY_SUBMISSION || newkeys == KEY_SUBMISSION))
{
GetPlayerPos(playerid,pl_pos[playerid][0],pl_pos[playerid][1],pl_pos[playerid][2]);
MapAndreas_FindZ_For2DCoord(pl_pos[playerid][0],pl_pos[playerid][1],pl_pos[playerid][3]);
pl_pos[playerid][4] = floatsub(pl_pos[playerid][2],pl_pos[playerid][3]);
if(pl_pos[playerid][4] >= ropelength) return SendClientMessage(playerid,0xAA3333AA,"You are too scared to slide from this height");
if(pl_pos[playerid][4] <= 2) return RemovePlayerFromVehicle(playerid);
SetPVarInt(playerid,"roped",1);
SetPlayerCheckpoint(playerid,pl_pos[playerid][0],pl_pos[playerid][1],floatsub(pl_pos[playerid][3],offsetz),20);
SetPlayerPos(playerid,pl_pos[playerid][0],pl_pos[playerid][1],floatsub(pl_pos[playerid][2],2));
SetPlayerVelocity(playerid,0,0,0);
for(new rep=0;rep!=10;rep++) ApplyAnimation(playerid,"ped","abseil",4.0,0,0,0,1,0);
for(new cre=0;cre<=pl_pos[playerid][4];cre++)
{
r0pes[playerid][cre] = CreateObject(3004,pl_pos[playerid][0],pl_pos[playerid][1],floatadd(pl_pos[playerid][3],cre),87.640026855469,342.13500976563, 350.07507324219);
}
SetTimerEx("syncanim",dur,0,"i",playerid);
}
return 1;
}

Albo mam pytanie na jaki przycisk lina si? uaktywnia? Bo nie mog? znale??, je?li tak to w jakiej linijce jest jakim przyciskiem sie uaktywnia to ju? nie b?dzie trzeba na zcmd. Dzi?ki, daje zimniutke, lub ciep?e do wyboru xd !


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-18, 11:21


hale







Wiek: 35
Na forum: 5942 dni
Posty: 775

Piwa: 2794

Respekt: 165,6
Respekt: 165,6Respekt: 165,6

[prze]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-19, 13:14


WiX







Wiek: 28
Na forum: 5241 dni
Posty: 48
Nick w MP: thedamiano

Piwa: 21

Respekt: 64

KEY_SUBMISSION - przycisk "2" na klawiaturze alfanumerycznej - czyli na tej nad QWERTY.

Postaw piwo autorowi tego posta
 

 
Tagi: [prośba]zmiana :: skryptu :: skrypt :: komendą :: zcmd.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [GF] [Prośba]Zmiana skryptu na skrypt z komendą zcmd. Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku