if(strcmp(cmdtext,"/sniper",true)==0)
{
new Name[24], Msg[128];
GetPlayerName(playerid, Name, sizeof(Name));
SetPlayerPos(playerid,-1973.2, 218.7, 3147.8999);
GivePlayerWeapon(playerid ,34 , 100);
format(Msg, 128, "%s: TELETRANSPORTOU PARA БREA DE SNIPERS!", Name);
SendClientMessageToAll(0x03F2FFFF, Msg);
return 1;
}
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}
}
new i = random(sizeof(RandomSpawn));
SetPlayerPos(playerid, RandomSpawn[i][0], RandomSpawn[i][1], RandomSpawn[i][2]);
SetPlayerFacingAngle(playerid, RandomSpawn[i][3]);
new Float:RandomSpawns[][] =
{
{/*coordenadasX*/,/*coordenadasY*/, /*coordenadasZ*/},
{/*coordenadasX*/,/*coordenadasY*/, /*coordenadasZ*/},
{/*coordenadasX*/,/*coordenadasY*/, /*coordenadasZ*/}
};
if(strcmp(cmdtext,"/sniper",true)==0)
{
new Name[24], Msg[128];
GetPlayerName(playerid, Name, sizeof(Name));
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
GivePlayerWeapon(playerid ,34 , 100);
format(Msg, 128, "%s: TELETRANSPORTOU PARA БREA DE SNIPERS!", Name);
SendClientMessageToAll(0x03F2FFFF, Msg);
return 1;
}
/*-- 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;
}
PHP код:
|
C:\Users\Familia\Desktop\Servidor\gamemodes\GM.pwn(32) : error 001: expected token: ";", but found "new"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
new Float:RandomSpawn[5][4] = {
{1973.2, 218.7, 3147.8999},
{1977.3, 68.5, 3147.8999},
{1973.2, 218.7, 3147.8999},
{1977.3, 68.5, 3147.8999},
{1973.2, 218.7, 3147.8999}
}
new Float:RandomSpawn[5][4] = { {1973.2, 218.7, 3147.8999}, {1977.3, 68.5, 3147.8999}, {1973.2, 218.7, 3147.8999}, {1977.3, 68.5, 3147.8999}, {1973.2, 218.7, 3147.8999} };