DestroyVehicle problem
#1

pawn Код:
if(strcmp(cmdtext, "/delveh", true) == 0)
     {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /delveh");
                return 1;
            }
            if (PlayerInfo[playerid][pAdmin] >=2)
            {
                    new currentveh;
                    currentveh = GetPlayerVehicleID(playerid);
                    DestroyVehicle(currentveh);
             }
                    else SendClientMessage(playerid, COLOR_RED,"You're not admin!");
            {
                format(string, sizeof(string), "*%d Admin %s: Deleted the vehicle", PlayerInfo[playerid][pAdmin], sendername);
                SendAdminMessage(COLOR_YELLOW,string);
            }
            printf("Admin %s: Deleted the vehicle", sendername);
            SendClientMessage(playerid, COLOR_GRAD1,"Vehicle deleted!");
        }
        return 1;
     }
There aren't any errors or warnings in pawno. The command just doesn't work. Can someone fix this code and please explain me what I did wrong?
Thanks :P
Reply


Messages In This Thread
DestroyVehicle problem - by Allu - 02.03.2012, 22:55
Re: DestroyVehicle problem - by Walsh - 03.03.2012, 00:13
Re: DestroyVehicle problem - by ricardo178 - 03.03.2012, 00:25
Re: DestroyVehicle problem - by Walsh - 03.03.2012, 00:30
Re: DestroyVehicle problem - by ricardo178 - 03.03.2012, 00:35
Re: DestroyVehicle problem - by Walsh - 03.03.2012, 00:39
Re: DestroyVehicle problem - by ricardo178 - 03.03.2012, 00:45

Forum Jump:


Users browsing this thread: 2 Guest(s)