Help! Problem minigun
#1

Hello. I have a problem to / minigunevent. When someone dies sometimes gives minigun, players who kills someone wanted to give them, and do not ask for winning kill sites. Please help me
Look here all command

if(strcmp(cmd, "/minigunevent", true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
if(!IsMinigun)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /minigunevent (prize - minim 200.000$)");
return 1;
}
new prize;
prize = strval(tmp);
if(GetPlayerMoney(playerid) < prize)
{
SendClientMessage(playerid, COLOR_GRAD2, "Nu ai suficienti bani pentru a incepe eventul!");
return 1;
}
GivePlayerMoney(playerid, -prize);
MinigunPrize = prize;
SendClientMessageToAll(0xFFD700AA,"{F3FF02}======= ==================== Minigun Event ===========================");
SendClientMessageToAll(0xFFD700AA,"{CCCCCC}Eventul {F3FF02}Minigun {CCCCCC}este pe cale sa inceapa!");
format(string, sizeof(string), "{CCCCCC}Organizator:{F3FF02} %s {CCCCCC}|| Premiu: {00CC00}%d {CCCCCC}|| Pentru inscriere tastati:{FF0000} /joinminigun", PlayerName(playerid), prize);
SendClientMessageToAll(0xFFD700AA, string);
SendClientMessageToAll(0xFFD700AA, "{CCCCCC}Acesta v-a incepe in {F3FF02}2 minute{CCCCCC}, grabeste-te sa te inscri");
SendClientMessageToAll(0xFFD700AA,"{F3FF02}======= ==================== Minigun Event ===========================");
StartingMinigun = 1;
SetTimer("AnnounceMinigun", 110000, 0);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "{CCCCCC}Este deja un event {F3FF02}Minigun {CCCCCC}in desfasurare!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You can't use that command");
return 1;
}
}
return 1;
}

if(strcmp(cmd, "/joinminigun", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(WantedLevel[playerid] >= 1)
{
SendClientMessage(playerid,COLOR_GREY," You can`t use this command, you are currently Wanted !");
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
SendClientMessage(playerid,COLOR_GREY," You can't use this command because you are cop!");
return 1;
}
if(PlayerInfo[playerid][pInMinigun] == 1)
{
SendClientMessage(playerid,0xFFD700AA,"{CCCCCC}Est i deja inscris in {F3FF02}Minigun Event!");
return 1;
}
if(HuntedPlayer == playerid)
{
SendClientMessage(playerid,COLOR_GREY,"{CCCCCC}Nu poti intra in {F3FF02}Minigun Event {CCCCCC}cat timp esti in {FF6600}Hunting Event!");
return 1;
}
if(StartingMinigun)
{
SendClientMessage(playerid, 0xFFD700AA, "{F3FF02}[Minigun Event] {CCCCCC}Te-ai inscris in {F3FF02}Minigun Event!");
PlayerInfo[playerid][pInMinigun] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "{F3FF02}[Minigun Event] {CCCCCC}Eventul nu este in curs de desfasurare!");
return 1;
}
}
return 1;
}
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 133
{
SetPlayerHealth(playerid, 0.0);
}
return 1;
}
/*if(strcmp("/ls",cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,2498.8965,-1684.7239,13.4232);
return 1;
}*/
Reply
#2

Can you please post the code in the code toolbar so we can see it better?
Use [ CODE] without the spaces [ /CODE]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)