Scripting (enum,new,flot)
#1

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

1) enum
2) new
3) flot

Can someone help me ...
Reply
#2

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);
Reply
#3

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

Rep +1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)