Problem with /respawncars
#4

Woops, I pasted the code wrong

pawn Код:
dcmd_respawncars(playerid, params[])
{
    #pragma unused params
    new IsInCar = 0;
    new pname[MAX_PLAYER_NAME], file[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), "\\Users\\%s.ini", pname);
    if(dini_Int(file, "level") >= 4)
    {
        for(new i=1; i < MAX_VEHICLES; i++)
        {
          for(new a=0; a < MAX_PLAYERS; a++)
          {
                if(IsPlayerInVehicle(a, i)) IsInCar = 1;
            }
            if (IsInCar == 1) SetVehicleToRespawn(i);
            IsInCar = 0;
        }
        SendClientMessageToAll(COLOUR_YELLOW, "[ADMIN]: Vehicles respawned by admin!");
        return 1;
    }
    else SendClientMessage(playerid, COLOUR_RED, "You are not allowed to use this command!");
    return 1;
}
Reply


Messages In This Thread
Problem with /respawncars - by sobolanux - 05.05.2010, 18:41
Re: Problem with /respawncars - by dice7 - 05.05.2010, 18:46
Re: Problem with /respawncars - by sobolanux - 05.05.2010, 18:51
Re: Problem with /respawncars - by dice7 - 05.05.2010, 18:55
Re: Problem with /respawncars - by sobolanux - 05.05.2010, 19:01

Forum Jump:


Users browsing this thread: