Commands problem.
#1

Hi all.
I have a problem with two commands.
One is /sethp, the other /engine.

Engine:

When I digit /engine, nothing happens.
pawn Код:
CMD:engine(playerid, params[])
{
    new string[256];
    new engine, lights, alarm, doors, bonnet, boot, objective;
    new veicolo = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(veicolo, engine, lights, alarm, doors, bonnet, boot, objective);
    if(!IsPlayerInAnyVehicle(playerid)) return 1;
    if(engine == VEHICLE_PARAMS_OFF) {
    format(string, sizeof(string), "* > %s gira la chiave ed accende il motore del veicolo.");
    SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 25.0, 1500);
    SendClientMessage(playerid, COLOR_PURPLE, string);
    SetVehicleParamsEx(veicolo, 1, 1, 0, 0, 0, 0, 0);
    } else if(engine == VEHICLE_PARAMS_ON) {
    format(string, sizeof(string), "* > %s gira la chiave e spenge il motore del veicolo.");
    SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 25.0, 1500);
    SendClientMessage(playerid, COLOR_PURPLE, string);
    SetVehicleParamsEx(veicolo, 0, 0, 0, 0, 0, 0, 0); }
    return 1;
}
Sethp:

When I digit /sethp [name] [amount], sometimes sets the HP to 48.

pawn Код:
CMD:sethp(playerid, params[])
{
if(PlayerData[playerid][AdminLevel] < 1) return SendUnathorizedMessage(playerid);
new target, vita, string[256], string1[256];
if(sscanf(params, "us[129]", target, vita)) return SendClientMessage(playerid, COLOR_SEABLUE, "{999999}Uso:{FFFFFF} /sethp [ID/Parte del nome] [quantitа]");
   if(IsPlayerConnected(target)) {
       if(!gIsPlayerLoggedIn[target]) return SendPlayerNotLoggedInMessage(playerid);
       SetPlayerHealth(target, vita);
       format(string, sizeof(string), "{999999}SERVER:{FFFFFF} Un admin ti ha settato gli HP a %d", vita);
       SendClientMessage(target, COLOR_WHITE, string);
       format(string1, sizeof(string1), "Admin:{FFFFFF} %s ha settato a %s gli HP a %d", GetPlayersName(playerid), GetPlayersName(target), vita);
       SendAdministratorMessage(string1); }
       return 1;
}
Thank you in advance.
Reply


Messages In This Thread
Commands problem. - by alanhutch - 28.04.2015, 21:09
Re: Commands problem. - by Richie© - 28.04.2015, 21:13
Re: Commands problem. - by Konstantinos - 28.04.2015, 21:17
Re: Commands problem. - by alanhutch - 28.04.2015, 21:19
Re: Commands problem. - by [KHK]Khalid - 28.04.2015, 21:19
Re: Commands problem. - by alanhutch - 28.04.2015, 21:21

Forum Jump:


Users browsing this thread: 1 Guest(s)