28.03.2011, 16:27
Hey scripters i am trying to make an mg1 cmd,
that if the player types once /mg1 and teleport him to that interior and player cant type /mg1 /mg1 again and again to abuse when player is in /mg1 and when player type again /mg1 it will say you're already in mg1.
Thnx
here is code:-
and the error:-
thnx
that if the player types once /mg1 and teleport him to that interior and player cant type /mg1 /mg1 again and again to abuse when player is in /mg1 and when player type again /mg1 it will say you're already in mg1.
Thnx
here is code:-
pawn Код:
CMD:mg1(playerid, params[])
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
new string[128];
new rand = random(sizeof(RandomSpawn));
IsInMiniGame[playerid] = 1;
format(string,sizeof(string), "%s has joined the Minigun 1. (/MG1)", pName);
SendClientMessageToAll(0x33CCFFAA, string);
SetPlayerVirtualWorld(playerid, 30);
SetPlayerInterior(playerid, 17);
GivePlayerWeapon(playerid, 38, 10000);
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
else
{
if(IsInMiniGame[playerid] == 1)
{
format(string, sizeof(string), "Type ~r~/Exitmg1 to exit from ~g~the MG1!");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
return 1;
}
pawn Код:
C:\Users\smith\Desktop\Server 2\gamemodes\rrrrrr.pwn(177) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.