SA-MP Forums Archive
Scripting (enum,new,flot) - 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)
+--- Thread: Scripting (enum,new,flot) (/showthread.php?tid=338544)



Scripting (enum,new,flot) - MichaelProPlayer - 30.04.2012

Hi I don't understand these types of scripts ...

1) enum
2) new
3) flot

Can someone help me ...


Re: Scripting (enum,new,flot) - Kitten - 30.04.2012

1. https://sampwiki.blast.hk/wiki/Scripting:tags#Enums

Example:

pawn Код:
enum pinfo
{
     pKills,
     pDeaths
}
new PlayerInfo[MAX_PLAYERS][pinfo];

PlayerInfo[playerid][pKills] = 1; // Other whatever you want it, it's just an example
2. New is used for defining something "new" as in an variable etc.

3. https://sampwiki.blast.hk/wiki/Float

Example:

pawn Код:
new Float:hp;

GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp-25);



Re: Scripting (enum,new,flot) - MichaelProPlayer - 30.04.2012

Wow Thanks for responding soo fast in 2 topics ... Keep helping ..

Rep +1