Help me Car wont despawn with command
#1

pawn Код:
if(strcmp(cmd,"/despawncopcar",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(PlayerInfo[playerid][pMember] != 6)
            {
                //SendClientMessage(playerid, COLOR_GREY, " You are not a Police Officer.");
                //return 1;
            }
            for(new car = 0; car < MAX_VEHICLES; car++)
            {
                if(CopInfo[car][Created] == 0)
                {
                    if(strcmp(CopInfo[car][Owner], sendername, true) == 0)
                    {
                        SendClientMessage(playerid, COLOR_GREY, " Police Vehicle Despawned !");
                        SetVehicleToRespawn(car);
                        return 1;
                    }
                }
                else
                {
                    return SendClientMessage(playerid, COLOR_GREY, " An error has occured.");
                }
            }
            return 1;
        }
        return 1;
whats wrong in this
Reply
#2

Are you sure "car" is the right vehicleid?
Reply
#3

Fixed and sent in PM.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)