SA-MP Forums Archive
if a player has a certain varible - 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: if a player has a certain varible (/showthread.php?tid=355747)



if a player has a certain varible - Slappybay - 01.07.2012

ok when i put in a variable through a dialog that is set to a players statistic, i want it to return the name :P

Код:
enum Playerstatistics
{
    description[255],
    description2[255],
}

for(new i=0;i<MAX_PLAYERS;i++) //loop for all players
{ 
    new string[128];
    if(strlen(inputtext) ==  Player[i][description] || strlen(inputtext) ==  Player[i][description2]))
    {
          format(string,sizeof(string),"%s",GetName(i));
          SendClientMessage(playerid,WHITE,string);
    }
    else
    {
         SendclientMessage(playerid,WHITE,"nothing was found");
    }
}