07.03.2012, 17:09
Hey guys
I got a problem with my /tow command
We are two players, i am the mechanic. If i connect in first (id 0) when my mates do /tow i receive all informations
Same thing now but, if i connect after him, i receive nothing
What's the problem?
Thanks!!!!!
I got a problem with my /tow command
We are two players, i am the mechanic. If i connect in first (id 0) when my mates do /tow i receive all informations
Same thing now but, if i connect after him, i receive nothing
What's the problem?
Код:
CMD:tow(playerid, params[]) { if (TowTruckers==0) { SendClientMessage(playerid,COLOR_GREY,"XXXX"); return 1; } new pppName[MAX_PLAYER_NAME]; new Float:x, Float:y, Float:z; GetPlayerName(playerid,pppName,sizeof(pppName)); GetPlayerPos(playerid, x, y, z); SendClientMessage(playerid,COLOR_LIGHTBLUE,"XXXX."); SendClientMessage(playerid,COLOR_YELLOW,"XXXXX"); for(new i=0; i<MAX_PLAYERS; i++) { new msg[256]; new Float: fDistance = GetPlayerDistanceFromPoint(playerid, x, y, z), szMessage[44]; format(msg,sizeof(msg),"*** %s (id:%d) needs to be towed ***", pppName, i); printf("Faction %d", Faction[i]); printf("Service %d", Service[i]); if (Faction[i] == 2 && Service[i] == 1) { SendClientMessage(i,COLOR_YELLOW,msg); format(szMessage, sizeof(szMessage), "X is at %f meters", fDistance); SendClientMessage(i,COLOR_PURPLE,szMessage); SetPlayerCheckpoint(i, x, y, z, 3.0); } return 1; } return 1; }