lock command
#2

pawn Код:
CMD:lock(playerid, params[])
{
    if(sscanf(params, "u", params[0])) return SendClientMessage(playerid,Red,"Lock vehicle: /lock <id>");
    if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid,Red,"Player is not connected");
    if(!IsPlayerInAnyVehicle(params[0])) return SendClientMessage(playerid,Red,"Player not in vehicle");
   
    GetPlayerName(params[0], name,sizeof(name));
    format(str,sizeof(str),"Vehicle: LOCKED FOR %s", name);
    SendClientMessage(playerid, Red, str);
   
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(i != params[0])
            {
                SetVehicleParamsForPlayer(GetPlayerVehicleID(params[0]), i, 0, 1);
            }
        }
    }
    return true;
}
Reply


Messages In This Thread
lock command - by TuNiSiAnO1 - 08.01.2015, 23:22
Respuesta: lock command - by JuanStone - 08.01.2015, 23:32

Forum Jump:


Users browsing this thread: 1 Guest(s)