19.02.2012, 03:38
Hi, /createvent works perfectly except...The first weapon(Second works fine).
What I mean by the first weapon not working is, it always sets it to 1, making ti brass knuckles.
pawn Код:
new Float:eX, Float:eY, Float:eZ, eGun, eGun1, eSkin, Event; //Obviously got this on top
pawn Код:
cmd(createvent, playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, GREY, "You are not authorized to use this command");
if(Event == 1 || Event == 2) SCM(playerid, GREY, "Event already started");
if(sscanf(params, "uii", eGun,eGun1, eSkin)) return SendClientMessage(playerid, GREY, "CMD:/createvent [Gun1] [Gun2] [Skin]");
GetPlayerPos(playerid, eX, eY, eZ);
GivePlayerWeapon(playerid, 38, 99999);
SendClientMessageToAll(GREEN, "Warning:An event has been opened, to join write /joinevent.");
SendClientMessageToAll(GREEN, "After the event you will spawn where you were, with all your weapons");
Event = 1;
return 1;
}
pawn Код:
cmd(joinevent, playerid, params[])
{
if(InEvent[playerid] == 1) return SCM(playerid, GREY, "You are already in the event!");
if(Event == 0) return SCM(playerid, GREY, "There is no event going on!");
if(Event == 2) return SCM(playerid, GREY, "Event is locked!");
UpdateStats(playerid);
SetSpawnInfo(playerid, 0, eSkin, eX, eY, eZ, 269.15, eGun, 99999, eGun1, 99999, 0, 0);
SpawnPlayer(playerid);
InEvent[playerid] = 1;
return 1;
}