SA-MP Forums Archive
Please help me its urgent - 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: Please help me its urgent (/showthread.php?tid=518282)



Please help me its urgent - psoni9697 - 09.06.2014

hello sir i need help in small scripting!

when we do /sfa then we teleported to sfa but i want a message to be shown on main chat like this riftpeat(0): has teleported to /sfa
where Driftpeat(0) must be in playercolor and has teleported to /sfa be in white color can u tell me the code


Re: Please help me its urgent - SAMProductions - 09.06.2014

Simply add this on your command :-
pawn Code:
new string[200];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "{%06x}%s(%d){FFFFFF}: has teleported to /sfa", (GetPlayerColor(playerid) >>> 8), pName, playerid);
SendClientMessageToAll(-1, string);



Re: Please help me its urgent - PrinXe - 09.06.2014

their is some problem with this command

when player do /sfa then its showing player colour Black instead of its actual colour ??


Re: Please help me its urgent - ]Rafaellos[ - 09.06.2014

Are you trying to copy my Style PrinXe? You are ridiculous.


Re: Please help me its urgent - Konstantinos - 09.06.2014

Quote:
Originally Posted by PrinXe
View Post
their is some problem with this command

when player do /sfa then its showing player colour Black instead of its actual colour ??
https://sampwiki.blast.hk/wiki/GetPlayerColor

Quote:
Originally Posted by <!> Important Note
GetPlayerColor will return nothing (0)* unless SetPlayerColor has been used first.
Click HERE for a fix.
* 0 is black colour.


Re: Please help me its urgent - PrinXe - 09.06.2014

hmm sorry i was not copying your style just learning scripting because you style is easy too understand sorry for that.. i will not copy