SA-MP Forums Archive
How to - 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: How to (/showthread.php?tid=133511)



How to - 02manchestera - 12.03.2010

Hi i want to ad a 'else' but cant get it working, what i want it to do is say 'You Havent have a 5 killing spree keep tring'

Код:
if (strcmp(cmdtext, "/airstrike", true) == 0)
	{
	if(spree[playerid] == 5)
	{
		ShowPlayerDialog(playerid,DS,2,"Airstrikes","Vehicle Smasher \nEnemy Wave Attack \nTank Buster \nCarpet Bomb \nNuke \nAir Attack \nAir Bomber \nMegaNuke \nVehicle Nuke \nAircracker bomb \nAirCluster Bomb \nDestructorBomb \nFireCluster \nSplitterMissile \nMOAB ","Ok","Cancel");
		return 1;
	}



Re: How to - aircombat - 12.03.2010

here is it :

Код:
if (strcmp(cmdtext, "/airstrike", true) == 0)
	{
	if(spree[playerid] == 5)
	{
		ShowPlayerDialog(playerid,DS,2,"Airstrikes","Vehicle Smasher \nEnemy Wave Attack \nTank Buster \nCarpet Bomb \nNuke \nAir Attack \nAir Bomber \nMegaNuke \nVehicle Nuke \nAircracker bomb \nAirCluster Bomb \nDestructorBomb \nFireCluster \nSplitterMissile \nMOAB ","Ok","Cancel");
		return 1;
	}
    else { SendClientMessage(playerid,0xAA3333AA,"You Don't Have 5 Killing Spree"); }
    return 1;
    }



Re: How to - gotenks918 - 12.03.2010

You might want to change it a bit though, if someone has 6 kills they will get the same message.