10.05.2015, 22:53
i try to create a cmd for admins to get in player's vehicle while they are on foot but i keep failing.
anyone please help?
please help me
anyone please help?
Код:
CMD:gv(playerid, params[]) { new id; if(PlayerAcc[playerid][Log] == 0) return SendClientMessage(playerid, COLOR_RED, "Error: You are not logged in!"); if(PlayerAcc[playerid][Admin] >= 3) { if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "Gv: /gv (id)"); if(id == INVALID_PLAYER_ID) return ErrorMessages(playerid, 2); if(id == playerid) return ErrorMessages(playerid, 4); if(IsPlayerInVehicle(id)) if(GetPlayerState(playerid) == 2) { PutPlayerInVehicle(playerid, CarId[id], 1); } } return 1; }