21.04.2012, 03:16
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;
}