Help with Array!! - 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: Help with Array!! (
/showthread.php?tid=259848)
Help with Array!! -
VivianKris - 06.06.2011
I want to write a Team System.
now i have done it a lot.
Код:
enum PlayerInfo
{
pTeam,//Police Triad DaNangBoys Mafia
pRank
};
new pInfo[MAX_PLAYERS][PlayerInfo];
AND
Код:
public OnPlayerConnect(playerid)
{
pInfo[playerid][pRank] = None ;
pInfo[playerid][pTeam] = None;
}
AND
Код:
CMD:invite(blabla)
{
blabla...
if(pInof[playerid][pTeam] == Police && pInfo[playerid][pRank] == Leader)
{
blabla...
return 1;
}
}
This is seem wonderful ,BUT!!!!
Код:
E:\Rockstar Games\The MoonCity\gamemodes\mooncity.pwn(429) : error 017: undefined symbol "None"
E:\Rockstar Games\The MoonCity\gamemodes\mooncity.pwn(1403) : error 017: undefined symbol "Police"
E:\Rockstar Games\The MoonCity\gamemodes\mooncity.pwn(1403) : error 017: undefined symbol "Leader"
need to #define THIS or
Please Help me, THX. And excuse my BAD english.
Re: Help with Array!! -
VivianKris - 06.06.2011
Quote:
Originally Posted by ******
Yes, you need to define those values, either with "#define" or "enum" (latter recommended).
|
Extremely grateful!!!!
By the way
i want to ask another question about y_ini
USE the y_ini must with SetPlayerVar
Re: Help with Array!! -
CoaPsyFactor - 06.06.2011
no just instead of None put false
Re: Help with Array!! -
VivianKris - 06.06.2011
Quote:
Originally Posted by CoaPsyFactor
no just instead of None put false 
|
I want write them(None,Mifia,Police....) in Account.ini
Re: Help with Array!! -
CoaPsyFactor - 08.06.2011
then just put false, and then check if(pInfo[playerid][pRank] === false){
format(pInfo[playerid][pRank], 128, "None");
}
Re: Help with Array!! -
VivianKris - 09.06.2011
Quote:
Originally Posted by CoaPsyFactor
then just put false, and then check if(pInfo[playerid][pRank] === false){
format(pInfo[playerid][pRank], 128, "None");
}
|
sorry i cant see.
Re: Help with Array!! -
Mean - 09.06.2011
I think you should re-read the "How to make teams" tutorial.