SA-MP Forums Archive
i found 2 errors :) Please Help - 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: i found 2 errors :) Please Help (/showthread.php?tid=612215)



i found 2 errors :) Please Help - vikoo - 15.07.2016

Hello Guys, i just need help in that errors idk what i do with that
Quote:

CMD:kodann(playerid,params[]) {
if(PlayerInfo[playerid][KOD] >= 4 || IsPlayerAdmin(playerid))
{
if(isnull(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
CMDMessageToKOD(playerid,"ANNOUNCE");
foreach(Player,i)
{
if(PlayerInfo [KOD] >= 1)
{
GameTextForPlayer(params,4000,3);
}
}
}
else
{
SendClientMessage(playerid,red,"ERROR: You need to be a level 4 KOD member to use this command");
}
return 1;
}




Re: i found 2 errors :) Please Help - JustMe.77 - 15.07.2016

This are the correct params for GameTextForPlayer

Код HTML:
GameTextForPlayer(playerid, "string", time, style);
and use PlayerInfo[playerid]


Re: i found 2 errors :) Please Help - [cS]Owain - 15.07.2016

Use this, changes are in red.
Quote:
if(PlayerInfo[playerid][KOD] >= 1)
{
GameTextForAll(params,4000,3);
}




Re: i found 2 errors :) Please Help - vikoo - 15.07.2016

Quote:

GameTextForAll(params,4000,3);
}

but this will send to all players and this :kodann send to kod members just


Re: i found 2 errors :) Please Help - vikoo - 15.07.2016

and when i added it
Quote:

GameTextForPlayer(playerid, "string", time, style);

i found this
Quote:

(38419) : error 017: undefined symbol "time"




Re: i found 2 errors :) Please Help - [cS]Owain - 15.07.2016

Oh didnt have a look on above code .-.
In that case use this,
Quote:
if(PlayerInfo[i][KOD] >= 1)
{
GameTextForPlayer(i, params,4000,3);
}




Re: i found 2 errors :) Please Help - WhiteGhost - 15.07.2016

Lol,no they just told u how to do it
PHP код:
GameTextForPlayer(playerid"string"50003);//style 3 with 5secs 
https://sampwiki.blast.hk/wiki/GameTextForPlayer


Re: i found 2 errors :) Please Help - JustMe.77 - 15.07.2016

Quote:
Originally Posted by WhiteGhost
Посмотреть сообщение
Lol,no they just told u how to do it
PHP код:
GameTextForPlayer(playerid"string"50003);//style 3 with 5secs 
https://sampwiki.blast.hk/wiki/GameTextForPlayer
No, you're just showing it with this code to one single player, he want to show the GameText for all KOR Members.

Correct:

Код HTML:
GameTextForPlayer(i,params, 5000, 3);//style 3 with 5secs



Re: i found 2 errors :) Please Help - vikoo - 15.07.2016

Thank you All For Help ( JustMe.77 - hiteGhost - [cS]Owain)