/fltest
#1

Код:
if(strcmp(cmd, "/fltest", true) == 0)
{
PlayerToPoint(10,playerid,1958.300048,-2184.000000,13.500000);
{
fltest[playerid] = 1;
SendClientMessage(playerid, TEAM_GROVE_COLOR, "FLYING TEST, get a shamal from the airport!");
AntiHack(playerid,-SBizzInfo[2][sbEntcost]);
SBizzInfo[2][sbTakings] = SBizzInfo[2][sbTakings]+SBizzInfo[2][sbEntcost];
return 1;
}
SendClientMessage(playerid, COLOR_RED, "ERROR: Your to far from airport gates!");
return 1;
}
player types /fltest they need to be by the airport gates,
but the thing is, you could be any where to do /fltest, but they gota be by the airport gates to do /fltest..


Meaning.. somethings wrong with the code..
Reply
#2

After the first return 1;, you didnt do "else" and set fltest[playerid] to 0.
Reply
#3

Quote:
Originally Posted by [SAP
Sidhu ]
After the first return 1;, you didnt do "else" and set fltest[playerid] to 0.
fltest needs to be 1, cause if its 0, they get in a shamal, flying test wont work..
EDIT: and im confussed else?
Reply
#4

Is this not missing an If statement somewhere?

And I'm sure he means that if you type /fltest somewhere else, it should return something and should also set the fltest = 0...
Reply
#5

Your PlayerToPoint usage is incorrect, not to mention that there is now a native function for the same thing, IsPlayerInRangeOfPoint.

Код:
if(strcmp(cmd, "/fltest", true) == 0)
{
  if(IsPlayerInRangeOfPoint(playerid,10.0,1958.300048,-2184.000000,13.500000))
  {
    fltest[playerid] = 1;
    SendClientMessage(playerid, TEAM_GROVE_COLOR, "FLYING TEST, get a shamal from the airport!");
    AntiHack(playerid,-SBizzInfo[2][sbEntcost]);
    SBizzInfo[2][sbTakings] = SBizzInfo[2][sbTakings]+SBizzInfo[2][sbEntcost];
    return 1;
  }
  SendClientMessage(playerid, COLOR_RED, "ERROR: Your to far from airport gates!");
  return 1;
}
EDIT: Eh, Seif beat me to it, wrote this about 10 minutes ago and forgot to post it. :\
Reply
#6

oh! Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)