D:\fa\gamemodes\willsee.pwn(9499) : error 029: invalid expression, assumed zero D:\fa\gamemodes\willsee.pwn(9499) : error 017: undefined symbol "cmd_nitro" D:\fa\gamemodes\willsee.pwn(9499) : error 029: invalid expression, assumed zero D:\fa\gamemodes\willsee.pwn(9499) : fatal error 107: too many error messages on one line |
CMD:nitro(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >= 8)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You must be in a vehicle!");
AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
SendClientMessage(playerid,COLOR_LIGHTYELLOW,"Nitro added!"); //No idea what colour that is though.
return 1;
}
CMD:setweather(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >= 8)
{
new string[128],weather;
if(sscanf(params, "i", weather)) return SendClientMessage(playerid, COLOR_ORCHID, "USAGE: /setweather [weatherid]");
if(weather > 45 || weather < 0) return SendClientMessage(playerid, COLOR_RED, "Invalid weather ID.");
format(string,sizeof(string),"Administrator %s (%d) has setted all players weather to %d.",PlayerName(playerid),playerid,weather);
SendClientMessageToAll(COLOR_LIGHTRED,string);
SetWeather(weather);
}
else SendClientMessage(playerid, COLOR_RED,"You're not authorized to use this command !");
return 1;
}
CMD:nitro(playerid,params[]) { if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >= 8) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You must be in a vehicle!"); AddVehicleComponent(GetPlayerVehicleID(playerid),1010); SendClientMessage(playerid,COLOR_LIGHTYELLOW,"Nitro added!"); //No idea what colour that is though. } // this was missing return 1; }
You had a missing } for the if statement
Код:
CMD:nitro(playerid,params[]) { if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >= 8) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You must be in a vehicle!"); AddVehicleComponent(GetPlayerVehicleID(playerid),1010); SendClientMessage(playerid,COLOR_LIGHTYELLOW,"Nitro added!"); //No idea what colour that is though. } // this was missing return 1; } |
D:\fa\gamemodes\willsee.pwn(9496) : error 029: invalid expression, assumed zero D:\fa\gamemodes\willsee.pwn(9496) : error 017: undefined symbol "cmd_repair" D:\fa\gamemodes\willsee.pwn(9496) : error 029: invalid expression, assumed zero D:\fa\gamemodes\willsee.pwn(9496) : fatal error 107: too many error messages on one line |
CMD:repair(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >= 8)
{
if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, -1, "You are not in the driver seat!");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, -1, "Your vehicle has been sucessfully repaired!");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
}
return 1;
}
if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >= 8)
What does this mean ? what rank could use the command 1-8 ?
pawn Код:
|
What does this mean ? what rank could use the command 1-8 ?
pawn Код:
|
im wrong now in this
i cant use it i want it can use it from 1 to 8 |
if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >=
That will not allow those ranks to use it. You want if(PlayerInfo[playerid][pAdmin] >= 1) That will let anyone of admin rank 1+ use it. Yours allows anyone under and including rank 1 and rank 8 and above. |