CMD:applylic(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -2032.6999,-117.5,1035.1999))
new lastteam;
lastteam = gTeam[playerid];
{
if(FlyingLic[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You already have a pilot license.");
if(FlyingLic[playerid] == 0)
{
gTeam[playerid] = TEAM_FLIC;
GivePlayerMoney(playerid, -2000);
SendClientMessage(playerid, COLOR_BLUE, "You have starter San Firros flying test, go out to the hangar ann enter a testplane");
}
}
return 1;
}
if(FlicC[playerid] == 36)
{
DisablePlayerRaceCheckpoint(playerid);
new Float:health;
new veh;
veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, health);
if(health <700)
{
SendClientMessage(playerid,COLOR_RED,"You failed the Flyingtest,");
SendClientMessage(playerid,COLOR_RED,"try agein!");
}
else
{
SendClientMessage(playerid,COLOR_RED,"Congratulations, you successed the Flyingtest ");
SendClientMessage(playerid,COLOR_RED,"Licenses is now yours!");
(FlyingLic[playerid] = 1);
gTeam[playerid] = lastteam;
}
return 1;
}
CMD:applylic(playerid, params[])
{
new lastteam;
lastteam = gTeam[playerid];
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
gTeam[playerid] = lastteam;
return 1;
}
new lastteam[MAX_PLAYERS];
lastteam
to
lastteam[playerid]
Yes there is a way.
Your variable is must be outside of command. Put it somewhere near in #include. and it must new lastteam[MAX_PLAYERS]; pawn Код:
you must change pawn Код:
|