20.02.2010, 10:10
Hey guys, i made a /park command for admins,
But the command /park works only for the ID 0.
If i am ID 1, and type : /park
I have no response from the server (no text message, and it doesn't work)
But if i'm ID 0, i have the message, and it works!
Any ideas?
Thanks
Код:
if(strcmp(cmdtext, "/park", true) == 0) { if(PlayerInfo[playerid][admin] == 0) { SendClientMessage(playerid, COLOR_GREY, "You're not an admin"); return 1; } if(PlayerInfo[playerid][faction] != 8) { SendClientMessage(playerid, COLOR_GREY, "You are not a mechanic"); return 1; } SetTimer("park", 800, false); return 0; }
Код:
public park(playerid) { if(PlayerInfo[playerid][logged] == 0) { SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be connected"); return 1; } if(PlayerInfo[playerid][jailed] == 1) { SendClientMessage(playerid, COLOR_BRIGHTRED, "You are in jail."); return 1; } if(VehicleInfo[GetPlayerVehicleID(playerid)][buybar] == 1) { SendClientMessage(playerid, COLOR_BRIGHTRED, "This vehicle is unbuyable"); return 1; } if(PlayerInfo[playerid][admin] == 0) { SendClientMessage(playerid, COLOR_BRIGHTRED, "You're no an admin!"); return 1; } if(IsPlayerInAnyVehicle(playerid)) { new Float:spx,Float:spy,Float:spz; new Float:spa; GetVehiclePos(GetPlayerVehicleID(playerid),spx,spy,spz); GetVehicleZAngle(GetPlayerVehicleID(playerid),spa); VehicleInfo[GetPlayerVehicleID(playerid)][x_spawn] = spx; VehicleInfo[GetPlayerVehicleID(playerid)][y_spawn] = spy; VehicleInfo[GetPlayerVehicleID(playerid)][z_spawn] = spz; VehicleInfo[GetPlayerVehicleID(playerid)][za_spawn] = spa; format(securemess,sizeof(securemess),"You just parked %s's vehicle here",VehicleInfo[GetPlayerVehicleID(playerid)][owner]); SendClientMessage(playerid, COLOR_GREEN, securemess); return 1; } else { SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not in a vehicle"); return 1; } }
If i am ID 1, and type : /park
I have no response from the server (no text message, and it doesn't work)
But if i'm ID 0, i have the message, and it works!
Any ideas?
Thanks
