07.01.2011, 06:50
(
Последний раз редактировалось Vukilore; 17.02.2013 в 14:19.
)
Solved
public OnPlayerCommandText(playerid, cmdtext[])
{
new index, cmd[20];
cmd = strtok(cmdtext, index);
if(strcmp(cmd, "/soigner", true) == 0)
{
new vid = GetVehicleModel(vehicleid);
if(vid != 416) return SendClientMessage(playerid, COLOR_RED, "You are not in an ambulance!");
new seat = GetPlayerVehicleSeat(playerid);
if(seat == 1 || seat == 2 || seat == 3)
{
if(cTeam[playerid] == TEAM_MEDIC)
{
new tmp[20], id;
tmp = strtok(cmdtext, index);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /soigner [playerid]");
id = strval(tmp);
if(IsPlayerConnected(id) && id != INVALID_PLAYER_ID)
{
SetPlayerHealth(id, 100.0);
SendClientMessage(id, COLOR_LIGHTBLUE, "Vous avez e'te' soigne' par un medecin.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vous soignez cette personne.");
}
else return SendClientMessage(playerid, 0xFF0000AA, "[x] Cette personne n'existe pas.");//that's person don't exist
}
else return SendClientMessage(playerid, COLOR_RED, "Vous n'e^tes pas me'decin");
}
else return SendClientMessage(playerid, COLOR_RED, "You are not a passenger!");
return 1;
}
return 0; // Returns SERVER: Unknown command.
}
new index, cmd[20]; cmd = strtok(cmdtext, index); if(strcmp(cmd, "/soigner", true) == 0) { new vid = GetVehicleModel(vehicleid); if(vid != 416) return SendClientMessage(playerid, COLOR_RED, "[x] Vous n'кtes pas dans une ambulance !"); new seat = GetPlayerVehicleSeat(playerid); if(seat == 1 || seat == 2 || seat == 3) {
new vid = GetVehicleModel(vehicleid);
new vid = GetVehicleModel(GetPlayerVehicleID(playerid));