SCript don't work - 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: SCript don't work (
/showthread.php?tid=303554)
SCript don't work -
teudan - 14.12.2011
Hy guys, i make a script to read from file all factions member and show it to the leader but script don't work, please help me fix the script. Thanks
PHP код:
if(strcmp(cmd, "/allmember", true) == 0)
{
if(PlayerInfo[playerid][pLeader] == 0) { return SendClientMessage(playerid, COLOR_LIGHTRED, "Tu nu esti lider !");}
new string2[64];
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
format(string2, sizeof(string2), "LARP/Users/%s.ini", i);
if(PlayerInfo[playerid][pLeader] == dini_Int(string2,"Member"))
{
format(string, 256, "Membrul: %d",string2);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "test");
}
}
return 1;
}
Re: SCript don't work - suhrab_mujeeb - 14.12.2011
What isn't working in it?
Edit: Again this -.-
Change
pawn Код:
if(strcmp(cmd, "/allmember", true) == 0)
To
pawn Код:
if(strcmp(cmdtext, "/allmember", true) == 0)
And see if it works.
Re: SCript don't work -
teudan - 14.12.2011
Script compile but don't happen nothing if i type the command in the game