14.05.2013, 15:51
pawn Код:
if (strcmp("/virar", cmdtext, true, 10) == 0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new Float:X, Float:Y, Float:Z;
if(IsPlayerInAnyVehicle(playerid))
SetCameraBehindPlayer(playerid);
GetPlayerPos(playerid, X, Y, Z);
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
return 1;
}
}
pawn Код:
if(strcmp(cmdtext, "/reparar", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Profissao") == Mecanico || dini_Int(file, "aAdmin") == 1 || IsPlayerAdmin(playerid) == 1){
if(IsPlayerInAnyVehicle(playerid) == 1){
new VehicleID;
format(string, sizeof(string), "(INFO) Mecanico %s(ID: %d) vocк consertou um carro, cobre pelo serviзo.", aname, playerid);
SendClientMessage(playerid, Blue, string);
VehicleID = GetPlayerVehicleID(playerid);
RepairVehicle(VehicleID);
} else {
SendClientMessage(playerid, Vermelho, "(INFO) Vocк nгo estб em um carro para reparar.");
}
}
return 1;
}