SetPlayerPosition
#1

Hi,
Can somebody help me,i want to have more setplayerposition on 1 command rondomly.
Exemple:
Now,when i /prison somebody to go to this cord....
pawn Код:
1849.32995605,-1714.31005859,5201.54003906
Or to go to another cord...
You anderstand?
Iwant to choose rondomly sometimes antoher cord... another cord.....
Reply
#2

What command processor do you use?
Reply
#3

Код:
new Float:OOCPrisonSpawns[3][3] = {
	{-304.4369,1894.9891,29.8929},
	{-295.9042,1894.9121,29.8929},
	{-287.1133,1894.6259,29.8929}
};
Код:
			new rand = random(sizeof(OOCPrisonSpawns));
			Streamer_UpdateEx(giveplayerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
			SetPlayerPos(giveplayerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
Alittle tired.. hope this helped


Change the Cords to yours.
Reply
#4

pawn Код:
new Float:Jail[4][3] = { // If you want more change this numbers
{1849.32995605,-1714.31005859,5201.54003906},
{bla,bla,bla},
{bla,bla,bla},
{bla,bla,bla}
};
Hope it helped
Reply
#5

If default one..
pawn Код:
if(!strcmp(cmdtext, "/prison"))
     {
        SendClientMessage(playerid, 0xFFFFFFFF, "You've been sent to prison.");
        SetPlayerInterior(playerid,***);
        SetPlayerPos(playerid,1849.32995605,-1714.31005859,5201.54003906);
        SetPlayerFacingAngle(playerid,0.0);
        SetCameraBehindPlayer(playerid);
        return 1;
     }
}
Reply
#6

or you can use float, but you'll need to make a timer also..
Reply
#7

Soprano, how to meke that only for /prison command?To add on the /prison command or?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)