31.08.2009, 01:56
I have this code:
If the person on the other team is driving a tank the player can do /tplant and his tank will go on fire.
When i do the command ingame it says unknown command. Is it because noboby is near me + no one is in server? ( 127 . 0 . 0 . 7 - LAN )
Код:
if(strcmp(cmd, "/tplant", true) == 0) { if(gTeam[playerid] == TEAM_USA) { new tanker = GetClosestPlayer(playerid); if(GetDistanceBetweenPlayers(playerid,tanker) <= 5) { if(gTeam[tanker] == TEAM_USA) { SendClientMessage(playerid, COLOR_GREY, "You cannot plant a bomb in your teammates tank!"); return 1; } new tank = GetPlayerVehicleID(tanker); if(GetVehicleModel(tank) == 432) { SetVehicleHealth(tank, 0.0); } } else { SendClientMessage(playerid, COLOR_GREY, "No enemy tank spotted!"); } } else if(gTeam[playerid] == TEAM_GERMANY) { new tanker = GetClosestPlayer(playerid); if(GetDistanceBetweenPlayers(playerid,tanker) <= 5) { if(gTeam[tanker] == TEAM_GERMANY) { SendClientMessage(playerid, COLOR_GREY, "You cannot plant a bomb in your teammates tank!"); return 1; } new tank = GetPlayerVehicleID(tanker); if(GetVehicleModel(tank) == 432) { SetVehicleHealth(tank, 0.0); } } else { SendClientMessage(playerid, COLOR_GREY, "No enemy tank spotted!"); } } return 1; }
When i do the command ingame it says unknown command. Is it because noboby is near me + no one is in server? ( 127 . 0 . 0 . 7 - LAN )