24.08.2011, 13:24
Hello, I want to make a command to my safe position and then with the command /joinevent other players can teleport to my position safe.Also I want the command to safe my Interior and VirtualWorld.
And here is the problem:
When I type the command she gets my coordinates X Y Z Angle, but the Interior and VirtualWorld take them only ID 0
Sorry for my bad english ..
Here's the codes:
And here is the problem:
When I type the command she gets my coordinates X Y Z Angle, but the Interior and VirtualWorld take them only ID 0
Sorry for my bad english ..
Here's the codes:
Code:
new Float:TeleportEvent[6];
if(strcmp(cmd, "/startevent", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 5)
{
new pevent;
pevent = ReturnUser(tmp);
event = 1;
GetPlayerPos(playerid, TeleportEvent[0],TeleportEvent[1],TeleportEvent[2]);
GetPlayerFacingAngle(playerid, TeleportEvent[3]);
GetPlayerInterior(pevent);
GetPlayerVirtualWorld(pevent);
}
}
return 1;
}
if(strcmp(cmd, "/joinevent", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(event == 1)
{
if (GetPlayerState(playerid) != 1)
{
SendClientMessage(playerid, COLOR_ADMIN, "TEST");
}
else
{
new pevent;
SetPlayerPos(playerid, TeleportEvent[0],TeleportEvent[1],TeleportEvent[2]);
SetPlayerFacingAngle(playerid, TeleportEvent[3]);
SetPlayerInterior(playerid, GetPlayerInterior(pevent));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pevent));
}
}
if(event == 0)
{
SendClientMessage(playerid, COLOR_ADMIN, "TEST");
}
}
return 1;
}



