13.01.2014, 02:01
pawn Код:
new Float:CP_FLOAT[4];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/x", cmdtext, true, 10) == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerCheckpointEX(playerid,x,y,z,100);
SetTimerEx("ZONEFLASH2",1000,false,"i",playerid);
return 1;
}
return 0;
}
forward ZONEFLASH2(playerid);
public ZONEFLASH2(playerid)
{
CP_FLOAT[3]--;
SetTimerEx("ZONEFLASH2",1000,false,"i",playerid);
SetPlayerCheckpoint(playerid,CP_FLOAT[0],CP_FLOAT[1],CP_FLOAT[2],CP_FLOAT[3]);
return 1;
}
stock SetPlayerCheckpointEX(playerid,Float:x,Float:y,Float:z,Float:rad)
{
CP_FLOAT[0]=x;
CP_FLOAT[1]=y;
CP_FLOAT[2]=z;
CP_FLOAT[3]=rad;
SetPlayerCheckpoint(playerid,x,y,z,rad);
return 1;
}