Else problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Else problem (
/showthread.php?tid=85891)
Else problem -
Frankox - 10.07.2009
I wanted to make that the else means else if getplayerwatned level less than 1 but it means else if gTeam ...... So can someone fix that?
if(gTeam[killerid] == TEAM_ARMY)
{
if(GetPlayerWantedLevel(playerid) >= 1)
{
SendClientMessage(playerid,COLOR_LIGHTRED,"You are killed by the army you are going to the jail now");
SendClientMessage(killerid,COLOR_GREEN,"WELL DONE YOU KILLED A PLAYER FROM THE WANTED LIST");
GivePlayerMoney(killerid,15000);
GivePlayerMoney(playerid,-5000);
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are killed by the army but you wont lose money because you was inocent");
SendClientMessage(killerid,COLOR_LIGHTRED,"You killed an inocent player so you are going to lose some money");
GivePlayerMoney(killerid,-10000);
}
return 1;
}
Re: Else problem -
Frankox - 10.07.2009
Anyone can help?