Org help
#2

Because your IF statement isn't the way it should be.

This should work:
PHP код:
YCMD:napuni(playeridparams[], help)
{
    
#pragma unused help
    #pragma unused params
    
if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,CRVENA"ERROR: "BELA"Moras se ulogovati da bi koristio ovu komandu!");
    if(
PlayerInfo[playerid][pClan] != || PlayerInfo[playerid][pLider] != 4) return SCM(playerid,-1,CRVENA"ERROR: "BELA"Niste clan Auto Moto saveza!");
    if(
IsPlayerInAnyVehicle(playerid)) return SCM(playerid, -1CRVENA"ERROR: "BELA"Ne mozete to dok ste u vozilu!");
 new 
idcenaFloat:Poz[3];
  if(
sscanf(params"ui"idcena)) return SCM(playerid, -1SIVA"COMMAND: "CRVENA"/napuni [ID/Ime] [Cena goriva]");
  if(!
IsPlayerConnected(id)) return SCM(playerid, -1CRVENA"ERROR: "BELA"Igrac je offline!");
  
GetPlayerPos(idPoz[0], Poz[1], Poz[2]);
  if(!
IsPlayerInRangeOfPoint(playerid5.0Poz[0], Poz[1], Poz[2])) return SCM(playerid, -1CRVENA"ERROR: "BELA"Igrac nije blizu tebe!");
  if(!
IsPlayerInAnyVehicle(id)) return SCM(playerid, -1CRVENA"ERROR: "BELA"Igrac mora biti u vozilu!");
  if(
GetPlayerState(id) != PLAYER_STATE_DRIVERSCM(playerid, -1CRVENA"ERROR: "BELA"Igrac mora biti vozac!");
 if(
cena 3000) return SCM(playerid, -1CRVENA"ERROR: "BELA"Cena goriva ne moze biti veca od 3000$!");
    if(
VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(id)))) return SCM(playerid,-1,CRVENA"ERROR: "BELA"Ne mozete sipati gorivo u biciklo!");
 
PonudioGorivo[id] = playeridCenaGoriva[id] = cena;
 
SCMF(playerid, -1"BE | "HZELENA"Ponudili ste gorivo za vozilo igracu %s za %d$."GetName(id), cena);
 
SCMF(id, -1"BE | "HZELENA"AMS - Mehanicar %s vam je ponudio gorivo za vozila za %d$ | Da prihvatite /prihvati gorivo!"GetName(playerid), cena);
 return 
1;

'==' means if the player is in the 4th organization, return the error message.
'!=' means if the player is NOT in the 4th organization.
Reply


Messages In This Thread
ohelp - by Hunud - 31.01.2017, 08:15
Re: Org help - by saffierr - 31.01.2017, 09:00

Forum Jump:


Users browsing this thread: 1 Guest(s)