03.12.2010, 21:23
Hello everyone,im so tired after lot of scripting,now i don't even realise what im doing
Could someone tell me what is wrong here?It just don't gets load and crashes after using
Now another problem,this don't gets load too:
This don't gives me any message,its purelly not working
Im gonna put in the /credits the one who is helping me.Please
Could someone tell me what is wrong here?It just don't gets load and crashes after using
pawn Код:
if (strcmp(cmd, "/flights", true) == 0)
{
if (gPlayerLogged[playerid] != 0)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
new playerState = GetPlayerState(i);
new vehicleid = GetPlayerVehicleID(i);
if (playerState == PLAYER_STATE_DRIVER)
{
if(IsAPlane(vehicleid) || IsAHelli(vehicleid))
{
if(PlayerInfo[i][pInFlying] == 1)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(i,x,y,z);
GetPlayerName(i, giveplayer, sizeof(giveplayer));
new Info[128];
if(PlayerInfo[i][pInFlying] == 1){Info = "In Flying";}
if(PlayerInfo[i][pInFlying] == 0){Info = "On the ground";}
new destination[128];
if(PlayerInfo[playerid][pDestination] == 1){ destination = "Los Santos International Airport"; }
else if(PlayerInfo[playerid][pDestination] == 2){ destination = "Las Venturas International Airport"; }
else if(PlayerInfo[playerid][pDestination] == 3){ destination = "San Fierro International Airport"; }
else if(PlayerInfo[playerid][pDestination] == 4){ destination = "Las Venturas Desert Airport"; }
format(string, sizeof(string),"Name:%s Destination:%s Stats:%s",giveplayer, destination, Info);
if (strlen(string) > 1) SendClientMessage(playerid, 0xF5DEB3AA, string);
}
}
}
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"You need to logged in!");
}
return 1;
}
Now another problem,this don't gets load too:
This don't gives me any message,its purelly not working
pawn Код:
if (strcmp(cmd, "/stats", true) == 0)
{
if (gPlayerLogged[playerid] != 0)
{
ShowStats(playerid,playerid);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not Logged in!");
return 1;
}
return 1;
}
pawn Код:
public ShowStats(playerid,targetid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(targetid,x,y,z);
new string[128];
new alevel = PlayerInfo[targetid][pAdminLevel];
new Cash = PlayerInfo[targetid][pCash];
new Score = PlayerInfo[targetid][pScore];
new flights = PlayerInfo[targetid][pFlights];
new Info[128];
if(PlayerInfo[targetid][pInFlying] == 1){Info = "In Flying";}
if(PlayerInfo[targetid][pInFlying] == 0){Info = "On the ground";}
new pilotrank[21];
if(PlayerInfo[targetid][pPilot] == 1){ pilotrank = "General Pilot"; }
else if(PlayerInfo[targetid][pPilot] == 2){ pilotrank = "Co-Pilot"; }
else if(PlayerInfo[targetid][pPilot] == 3){ pilotrank = "Stewart"; }
new destination[128];
if(PlayerInfo[targetid][pDestination] == 1){ destination = "Los Santos International Airport"; }
else if(PlayerInfo[targetid][pDestination] == 2){ destination = "Las Venturas International Airport"; }
else if(PlayerInfo[targetid][pDestination] == 3){ destination = "San Fierro International Airport"; }
else if(PlayerInfo[targetid][pDestination] == 4){ destination = "Las Venturas Desert Airport"; }
new atcrank[22];
if(PlayerInfo[targetid][pAtcPlayer] == 1){ destination = "Lead Atc"; }
else if(PlayerInfo[targetid][pAtcPlayer] == 2){ destination = "Atc Sergeant"; }
SendClientMessage(playerid,COLOR_GREEN,"|____________________Your Stats : %s(%d)_____________________|");
format(string, sizeof(string),"Account Stats: Admin Level:%d Money:%d Score:%d Status:%s",alevel,Cash,Score,Info);
SendClientMessage(playerid,COLOR_GREEN,string);
format(string, sizeof(string),"Pilot Stats: Flights:%d Current Destination:%s Pilot Rank:%s",flights,destination,pilotrank);
SendClientMessage(playerid,COLOR_GREEN,string);
format(string, sizeof(string),"ATC Stats: ATC Rank:%s",atcrank);
SendClientMessage(playerid,COLOR_GREEN,string);
print("All the stats updated");
return 1;
}