14.08.2011, 04:00
Hello I have this code:
But when I launch the command insted of sending all the players to the virtual world 9 it sends me or in this case (the admin that starts the event).
Please help me.
pawn Код:
#include <a_samp>
#pragma tabsize 0
#define COLOR_BLUE 0x0259EAFF
forward TeleportPlayers(playerid, Float:X, Float:Y, Float:Z);
public TeleportPlayers(playerid, Float:X, Float:Y, Float:Z)
{
for(new i = 0; i < MAX_PLAYERS; i++) SetPlayerPos(i, 31.8683,2241.9827,126.6797);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/alexobando21", cmdtext, true, 10) == 0)
{
new szString[128], Float:Position[3], szName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szName, sizeof(szName));
GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
format(szString, sizeof(szString), "~g~Admin ~w~%s started a war get ready!", szName);
GameTextForAll(szString, 5000, 5 );
SetPlayerVirtualWorld(playerid, 9);
SetTimerEx("TeleportPlayers", 10000, false, "d", playerid, Position[0], Position[1], Position[2]);
return 1;
}
return 0;
}
Please help me.