Possible error with /impound Command.
#9

pawn Код:
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;
}
Try that. And also, I reccomend you using ZCMD+SSCANF. It's ALOT faster and params are easier to use.
Making the commands is also easier
Reply


Messages In This Thread
Possible error with /impound Command. - by iiLiamii - 09.01.2011, 02:35
Re: Possible error with /impound Command. - by Kwarde - 09.01.2011, 02:38
Re: Possible error with /impound Command. - by ToPhrESH - 09.01.2011, 02:39
Re: Possible error with /impound Command. - by iiLiamii - 09.01.2011, 02:43
Re: Possible error with /impound Command. - by iiLiamii - 09.01.2011, 02:48
Re: Possible error with /impound Command. - by iiLiamii - 09.01.2011, 02:49
Re: Possible error with /impound Command. - by Kwarde - 09.01.2011, 02:50
Re: Possible error with /impound Command. - by iiLiamii - 09.01.2011, 02:52
Re: Possible error with /impound Command. - by Kwarde - 09.01.2011, 02:57

Forum Jump:


Users browsing this thread: 1 Guest(s)