PHP код:
/*-- No topo do GM abaixo das includes --*/
new Float:RandomSpawn[5][4] = {
{cordX, cordY, cordZ, cordA},
{cordX, cordY, cordZ, cordA},
{cordX, cordY, cordZ, cordA},
{cordX, cordY, cordZ, cordA},
{cordX, cordY, cordZ, cordA}
}
/*-- Na public OnPlayerCommandText --*/
if(strcmp(cmdtext, "/sniper", true) == 0) {
new aname[MAX_PLAYER_NAME], Msg[128], i = random(sizeof(RandomSpawn));
GetPlayerName(playerid, aname, sizeof(aname));
SetPlayerPos(playerid, RandomSpawn[i][0], RandomSpawn[i][1], RandomSpawn[i][2]);
SetPlayerFacingAngle(playerid, RandomSpawn[i][3]);
GivePlayerWeapon(playerid ,34 , 100);
format(Msg, sizeof(Msg), "%s: TELETRANSPORTOU PARA БREA DE SNIPERS!", aname);
SendClientMessageToAll(0x03F2FFFF, Msg);
return 1;
}