16.12.2015, 21:04
PHP код:
CMD:makepos(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0],pos[1],pos[2]);
pInfo[playerid][posX] = pos[0];
pInfo[playerid][posY] = pos[1];
pInfo[playerid][posZ] = pos[2];
}
else
{
SendClientMessage(playerid, 1, " (( You have to be a rcon admin to do this )) ");
}
return 1;
}
CMD:gotopos(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetPlayerPos(i,pInfo[playerid][posX],pInfo[playerid][posY],pInfo[playerid][posZ]);
}
}
else
{
SendClientMessage(playerid, 1, " (( You have to be a rcon admin to do this )) ");
}
return 1;
}
PHP код:
enum PlayerData {
Float:posX,
Float:posY,
Float:posZ
}
new pInfo[MAX_PLAYERS][PlayerData];