SA-MP Forums Archive
help stock - 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: help stock (/showthread.php?tid=508845)



help stock - Snoopythekill - 24.04.2014

pawn Код:
stock Teleport(playerid)
{
new Mensaje = random(7);
switch(Mensaje)
{
case 0: format(string, sizeof(string), "{E6E6FA}*%s se teletransporto a %s (/%s)!");
case 1: format(string, sizeof(string), "{F0E68C}*%s se teletransporto a %s (/%s)!");
case 2: format(string, sizeof(string), "{98FB98}*%s se teletransporto a %s (/%s)!");
case 3: format(string, sizeof(string), "{F0FFF0}*%s se teletransporto a %s (/%s)!");
case 4: format(string, sizeof(string), "{B0E0E6}*%s se teletransporto a %s (/%s)!");
case 5: format(string, sizeof(string), "{B0C4DE}*%s se teletransporto a %s (/%s)!");
case 6: format(string, sizeof(string), "{FAEBD7}*%s se teletransporto a %s (/%s)!");
}
SendClientMessageToAll(0xFFFFFFFF, string);
return 1;
}
How do i do? For that the fine use this function anywhere:

pawn Код:
Teleport(playerid, Nick,"San Fierro","sf")
Help, thank you....


Re: help stock - BroZeus - 24.04.2014

for that u need to add coords of place along with its name in a enum


Re: help stock - Niko_boy - 24.04.2014

pawn Код:
stock Teleport(playerid, telename[], teleshort)
{
new string[128], playername[24];
GetPlayerName(playerid,playername);
format(string, sizeof(string), "{E6E6FA}*%s se teletransporto a %s (/%s)!", playername, telename, teleshort);
SendClientMessageToAll( -1, string ); // replace -1 by color you want
}
Quote:
Originally Posted by BroZeus
Посмотреть сообщение
for that u need to add coords of place along with its name in a enum
No he dont need it..
i mean look at his purpose he is trying to make it like Teleport(playerid,"Sanfierro", "sf"); and probably he is gonna use it in some command or otherway.