14.05.2013, 15:11
Alguem ajuda eu a fazer esses 2 cmds porfavor ?
Код:
dcmd(reparar,7,cmdtext);
Код:
dcmd(virar,5,cmdtext);
dcmd(reparar,7,cmdtext);
dcmd(virar,5,cmdtext);
No meu GM os comandos nгo й por / й assim dcmd(reparar,7,cmdtext);
|
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
C:\Users\usuario\Desktop\Adrenaline X\gamemodes\adrenaline.pwn(635) : warning 209: function "dcmd_reparar" should return a value C:\Users\usuario\Desktop\Adrenaline X\gamemodes\adrenaline.pwn(632) : warning 203: symbol is never used: "params" C:\Users\usuario\Desktop\Adrenaline X\gamemodes\adrenaline.pwn(632 -- 635) : error 021: symbol already defined: "RepairVehicle"
dcmd(reparar,7,cmdtext);
dcmd_reparar(playerid, params[]) if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Vocк nгo estб em um veнculo!"); RepairVehicle(GetPlayerVehicleID(playerid)); SendClientMessage(playerid, 0xFFFFFFFF, "Seu veнculo foi reparado com sucesso!");
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;
}
}
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;
}
if(strcmp(cmdtext, "/reparar", true) == 0) {