21.02.2017, 19:37
Quote:
Код:
// This function returns "true" is the given player is the leader of the convoy stock Convoy_IsLeader(playerid, Convoy) { printf("APlayerData[playerid][InConvoy]=%i",APlayerData[playerid][InConvoy]); printf("AConvoys[Convoy][Members][0]=%i",AConvoys[Convoy][Members][0]); // Check if the player is part of a convoy if ((APlayerData[playerid][InConvoy] == true) && (AConvoys[Convoy][Members][0] = playerid)) return true; // Player is in a convoy AND he's the leader of it else return false; // Player is a member of the convoy (or not in the same convoy) } |
PHP код:
[22:29:07] APlayerData[playerid][InConvoy]=1
[22:29:07] AConvoys[Convoy][Members][0]=0
Nothing wrong