I need 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I need help (
/showthread.php?tid=130623)
I need help -
goncalo93 - 27.02.2010
Can anyone help me?
I have this code...
Код:
new Float:rPos[3][3] = {
{3422.6,-447.5,210.8}, // pos 1
{4587.4455, 4789.8977, 1214.6544}, // pos 2
{1.021, 45.0114, 6444.0000} // pos 3
};
Код:
if(!strcmp(cmdtext,"/trampolim",true))
{
new rand = random(sizeof(rPos))
SetPlayerPos(playerid, rPos[rand][0], rPos[rand][1], rPos[rand][2]);
SendClientMessageToAll(0xDEEE20FF, "Alguйm foi para o trampolim (/trampolim).");
return 1;
}
When I try to compile give this error
Код:
C:\Documents and Settings\Goncalo\Ambiente de trabalho\samp03asvr_R4_win32\filterscripts\base.pwn(89) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Line 89 is SetPlayerPos(playerid, rPos[rand][0], rPos[rand][1], rPos[rand][2]);
Re: I need help -
Correlli - 27.02.2010
Quote:
Originally Posted by goncalo93
Код:
new rand = random(sizeof(rPos))
|
Change it to:
Код:
new rand = random(sizeof(rPos));
Re: I need help -
goncalo93 - 27.02.2010
Tks it works now
Im too noob
Re: I need help -
Correlli - 27.02.2010
You're welcome.
Re: I need help -
goncalo93 - 27.02.2010
BTW, how i put a player nick or a player id in a SendClientMessageToAll
Re: I need help -
Correlli - 27.02.2010
You mean this?
pawn Код:
new
array[128];
GetPlayerName(playerid, array, MAX_PLAYER_NAME);
format(array, sizeof(array), "%s (%i) bla bla..", array, playerid);
SendClientMessageToAll(0xFFFFFFFF, array);
Re: I need help -
goncalo93 - 28.02.2010
Yes. Now i have a teleport comand and I want when we use the command a player spwan in a car.