12.02.2012, 21:01
Qual funзгo eu uso pra quando o cara sair do jetpack ele seja destruнdo ?
CMD:jetpackoff(playerid,params[])
{
if(GetPlayerSpecialAction(playerid)==2)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(playerid,X,Y,Z);
SetPlayerSpecialAction(playerid,0);
}
return 1;
}
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
SendClientMessage( playerid, RED, "Jet Pack Removido" );
}
else
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
SendClientMessage( playerid, -1, "Jet Pack Criado." );
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
}
}
return 1;
}
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
SendClientMessage(playerid, -1, "Vocк Nгo й VIP.");
return true;
}
if( !strcmp( cmdtext, "/djetpack", true ))
{
new
Float:x, Float:y, Float:z
;
GetPlayerPos( playerid, x, y, z );
SetPlayerPos( playerid, x, y, z );
SetPlayerSpecialAction( playerid, SPECIAL_ACTION_NONE );
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SECONDARY_ATTACK && !(oldkeys & KEY_SECONDARY_ATTACK))
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
return 1;
}
O Stewie chegou.
pawn Код:
|