I need help
#1

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]);
Reply
#2

Quote:
Originally Posted by goncalo93
Код:
new rand = random(sizeof(rPos))
Change it to:
Код:
new rand = random(sizeof(rPos));
Reply
#3

Tks it works now Im too noob
Reply
#4

You're welcome.
Reply
#5

BTW, how i put a player nick or a player id in a SendClientMessageToAll
Reply
#6

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);
Reply
#7

Yes. Now i have a teleport comand and I want when we use the command a player spwan in a car.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)