18.06.2016, 22:02
(
Последний раз редактировалось JXF; 18.06.2016 в 23:02.
)
So I would like to give a player the pAdmin variable, which is under my enum. When the player with the name "JXF" would connect, I would like the server to give him the pAdmin variable with the level 1338. How would I manage to do that?
Here's my strcmp code:
EDIT:
I have tried to do the On player connect to give player variables with SetPVarInt
This is my code:
IT does compile, but it doesn't work properly. What is the issue here?
P.S I have never used setpvarint ever before.
Here's my strcmp code:
Код:
forward NameJXF(playerid); public NameJXF(playerid) { if(IsPlayerConnected(playerid)) { new nume[24]; GetPlayerName(playerid, nume, sizeof(nume)); if((strcmp(nume, "JXF", true) == 0)) { return 1; } } return 0; }
I have tried to do the On player connect to give player variables with SetPVarInt
This is my code:
Код:
public OnPlayerConnect(playerid) { if(NameJXF(playerid)) { new string[128]; format(string, sizeof(string), "You have been given full administrator rights, master!"); SCM(pid, COLOR_AQUA, string); SetPVarInt(playerid, Player[playerid][pAdmin], 1339); }
P.S I have never used setpvarint ever before.