sscanf help = +Rep =S
#2

pawn Код:
COMMAND:load(playerid, vehicleid, params[])
{
    new LoadName;
    new SenderName[MAX_PLAYER_NAME];
    new PlayerName[MAX_PLAYER_NAME];
    if (sscanf(params, "u", LoadName)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cuff [Player ID]"),1;
    if(!IsPlayerConnected(LoadName) || LoadName == INVALIR_PLAYER_ID) return SendClientMessage(playerid, COLOR_BRIGHTRED, "(INFO) You have specified an invalid player ID."),1;
    if(gteam[playerid] == 2)
    {
        new string[128];
        GetPlayerName(playerid, SenderName, sizeof(SenderName));
        GetPlayerName(LoadName, PlayerName, sizeof(PlayerName));
        PutPlayerInVehicle(LoadName, vehicleid, 3);
        format(string, sizeof(string), "(INFO) You have loaded %s into your ambulance.", LoadName);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "(INFO) You have been loaded into a ambulance by %s", SenderName);
        SendClientMessage(LoadName, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "DISPATCH: %s has loaded %s into the ambulance.", SenderName, LoadName);
        SendFireMessage(COLOR_BRIGHTRED, string);
        TogglePlayerControllable(LoadName, 0);
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
sscanf help = +Rep =S - by GtasaPoliceModz - 21.04.2012, 02:54
Respuesta: sscanf help = +Rep =S - by Francis. - 21.04.2012, 03:16

Forum Jump:


Users browsing this thread: 3 Guest(s)