09.01.2013, 17:30
Hi..
I got some zcmd codes but want it to be strcmp, Could anyone of you be kind and convert the codes to strcmp?
I got some zcmd codes but want it to be strcmp, Could anyone of you be kind and convert the codes to strcmp?
pawn Код:
CMD:revive(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
new giveplayerid;
if (Param_Add(params, ' ', "u", giveplayerid) == 0) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /revive [player]");
if (!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "That player isn't connected.");
if (!PlayerDead[giveplayerid]) return SendClientMessage(playerid, COLOR_GREY, "That player is not injured.");
PlayerDead[giveplayerid] = 0;
DeletePVar(giveplayerid, "Wasted");
for (new i = 0; i < 3; i ++) PlayerDeadPos[giveplayerid][i] = 0.0;
PlayerDeadInt[giveplayerid] = 0;
PlayerDeadWorld[giveplayerid] = 0;
ClearAnimations(giveplayerid);
TogglePlayerControllable(giveplayerid, 1);
SetPlayerHealth(giveplayerid, 100);
SendClientMessageEx(playerid, WHITE, "You have revived %s.", PlayerName(giveplayerid));
SendClientMessageEx(giveplayerid, WHITE, "You have been revived by Admin %s.", PlayerName(giveplayerid));
return 1;
}
return 1;
}
pawn Код:
CMD:loadpatient(playerid, params[])
{
if (PlayerInfo[playerid][pMember] != 4)
return SendClientMessage(playerid, COLOR_GREY, "You are not a medic.");
new giveplayerid;
if (Param_Add(params, ' ', "u", giveplayerid) == 0)
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /loadpatient [player]");
return 1;
}
new vehicleid = GetPVarInt(playerid, "VehicleID");
if (GetVehicleModel(vehicleid) != 416)
{
SendClientMessage(playerid, COLOR_GREY, "The last vehicle you entered is not an ambulance.");
return 1;
}
if (GetDistanceBetweenPlayers(playerid, giveplayerid) < 7)
{
if (PlayerDead[giveplayerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "That player is not injured.");
return 1;
}
new
takenSeats[2],
availableSeat = -1;
for (new i = 2; i < 4; i ++)
{
for (new p = 0; p < MAX_PLAYERS; p ++)
{
if (IsPlayerInVehicle(p, vehicleid))
{
takenSeats[GetPlayerVehicleSeat(p) - 2] = 1;
}
}
if (!takenSeats[i - 2])
{
availableSeat = i;
break;
}
}
if (availableSeat == -1)
return SendClientMessage(playerid, COLOR_GREY, "There are no available seats left for the patient.");
SetPlayerInterior(giveplayerid, 0);
SetPlayerVirtualWorld(giveplayerid, 0);
PlayerDead[giveplayerid] = 3;
TogglePlayerControllable(giveplayerid, 0);
PutPlayerInVehicle(giveplayerid, vehicleid, availableSeat);
SendClientMessageEx(playerid, COLOR_WHITE, "You have loaded {FF8282}%s{FFFFFF} into the ambulance.", PlayerName(giveplayerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, "{FF8282}Paramedic %s{FFFFFF} has loaded you into the ambulance - you're now on your way to the hospital!", PlayerName(giveplayerid));
LoadedPatient[playerid] = giveplayerid;
SetPlayerCheckpoint(playerid, 2021.6178, -1414.9130, 16.9922, 6.0);
return 1;
}
else SendClientMessage(playerid, COLOR_GREY, "You are not near that player.");
return 1;
}