if(!strcmp(cmdtext,"/impound",true))
{
if(!IsACop(playerid))return SendClientMessage(playerid,COLOR_WHITE,"You must be a cop to perform this");
if(!cmdtext[9])return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /Impound [playerid/name]");
new player=ReturnUser(cmdtext[9]);
if(!IsPlayerConnected(player))return SendClientMessage(playerid,COLOR_WHITE,"Player Not Found");
if(!IsPlayerInAnyVehicle(player))return SendClientMessage(playerid,COLOR_WHITE,"Player Is Not In A Vehicle");
new vehid=GetPlayerVehicleID(player);
new lights,alarm,doors,bonnet,boot,objective;
Impounded[vehid]=1;
GetVehicleParamsEx(vehid,lights,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehid,0,lights,alarm,doors,bonnet,boot,objective);
return SendClientMessage(playerid,COLOR_WHITE,"Vehicle has been booted!");
}
|
return SendClientMessage(playerid,COLOR_WHITE,"Vehicle has been booted!"); |
SendClientMessage(playerid,COLOR_WHITE,"Vehicle has been booted!");
return 1;
}
|
The last line is wrong. 'cos it is "return SendClientMessage"
Try chanching that to SendClientMessage(playerid,COLOR_WHITE,"Vehicle has been booted!");. That should work. If it won't work, just make it 'SendClientMessage' without return and add 'return 1;' at the bottom (you also can get a warning if you don't add 'return 1;') pawn Код:
|
|
^^ Your right but you could also type it wrong like this:
Well I read your message and you said you use /Impound command ... Do you use "i" or do you use "I"? |
|
The last line is wrong. 'cos it is "return SendClientMessage"
Try chanching that to SendClientMessage(playerid,COLOR_WHITE,"Vehicle has been booted!");. That should work. If it won't work, just make it 'SendClientMessage' without return and add 'return 1;' at the bottom (you also can get a warning if you don't add 'return 1;') pawn Код:
|
|
No I use /impound |
|
if(!strcmp(cmdtext,"/impound",true)) |
|
Indeed. Uppercase's doesn't matter: It won't check for uppercase because "bool:ignorecase" = true.
Just try "/iMpOUnD" - It should work... And ehm, Was "Player" in any vehicle? - Wait I'll remake the code. Lemme try xD |
if(!strcmp(cmdtext, "/impound", true))
{
new engine, lights, alarm, doors, bonnet, boot, objective;
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "You must be an cop!");
if(!strlen(cmdtext[9])) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /inmpound [playerid]");
if(!IsPlayerConnected(strval(cmdtext[9]))) return SendClientMessage(playerid, COLOR_WHITE, "That player is not connected or an invalid player ID!");
if(!IsPlayerInAnyVehicle(strval(cmdtext[9]))) return SendClientMessage(playerid, COLOR_WHITE, "The player isn't in any vehicle!");
Impounded[GetPlayerVehicleID(strval(cmdtext[9])) = 1;
GetVehicleParamsEx(GetPlayerVehicleID(strval(cmdtext[9])), engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(GetPlayerVehicleID(strval(cmdtext[9])), 0, lights, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid, COLOR_WHITE, "Vehicle has been booted!");
return 1;
}