how to create codes like [playerId][PlayerData] - 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: how to create codes like [playerId][PlayerData] (
/showthread.php?tid=625612)
how to create codes like [playerId][PlayerData] -
XHunterZ - 04.01.2017
Eg If [pData][pAdmin] <= 5
SendClientMessage(playerid, "Command successfully executed");
hope u got what im trying to say..
Respuesta: how to create codes like [playerId][PlayerData] -
Whillyrez - 04.01.2017
Use enums to save player's info.
Re: how to create codes like [playerId][PlayerData] -
RyderX - 04.01.2017
Quote:
Originally Posted by XHunterZ
Eg If [pData][pAdmin] <= 5
SendClientMessage(playerid, "Command successfully executed");
hope u got what im trying to say..
|
For an example you've to make Admin system like this:
PHP код:
enum PlayerData {
Pass,
Cash,
Score,
Admin
};
new Player[MAX_PLAYERS][PlayerData];
So when you'd make a command just for admin:
PHP код:
CMD:healme(playerid,params[])
{
if(Player[playerid][Admin] >= 1)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0xF8F8F8FFF, "[SERVER]: {FFFFFF}You've been successfully Healed!");
}
return 1;
}
and like that..
And to learn how to make a simple Admin system just
click here
Re: Respuesta: how to create codes like [playerId][PlayerData] -
ISmokezU - 04.01.2017
Quote:
Originally Posted by Whillyrez
Use enums to save player's info.
|
Read this please,
https://sampforum.blast.hk/showthread.php?tid=318307