Crashing pawno
#1

pawn Код:
forward gun(playerid);
public gun(playerid)
{
if(PlayerInfo2[playerid][gun] == 1)
{
    new ammo = random(500);
    format(string2,sizeof(string2),"{FFFB00}[BOT]COD gifted you {00FF26}Minigun with %d Ammo Enjoy!.",ammo);
    SendClientMessage(playerid,red,string4);
    GivePlayerWeapon(playerid, 38, ammo);
    format(string2,sizeof(string2),"{FAFF6B}%s Recived Minigun With %d Ammo From [BOT]COD.{FF0000} (/gift)",PlayerName4,ammo);
    SendClientMessageToAll(blue, string2);
    IRC_GroupSay(groupID, IRC_CHANNEL, string2);
    GiftLog(string2);
}
if(PlayerInfo2[playerid][gun] == 2)
{
    new ammo = random(250);
    format(string2,sizeof(string2),"{FFFB00}[BOT]COD gifted you {00FF26}Rocket Launcher with %d Ammo Enjoy!.!",ammo);
    SendClientMessage(playerid,red,string4);
    GivePlayerWeapon(playerid, 35, ammo);
    format(string2,sizeof(string2),"{FAFF6B}%s Recived Rocket Launcher With %d Ammo From [BOT]COD.{FF0000} (/gift)",PlayerName4,ammo);
    SendClientMessageToAll(blue, string2);
    IRC_GroupSay(groupID, IRC_CHANNEL, string2);
    GiftLog(string2);

}
if(PlayerInfo2[playerid][gun] == 3)
{
    SetPlayerHealth(playerid, 9999);
    SetPlayerColor(playerid, 0xF600F6FF);
    GivePlayerWeapon(playerid, 38, 9999);
}
if(PlayerInfo2[playerid][gun] == 4)
{
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid, 99);
    GivePlayerWeapon(playerid, 38, 9999);
}
if(PlayerInfo2[playerid][gun] == 5)
{
    GivePlayerWeapon(playerid, 38, 9999); // Minigun
}

if(PlayerInfo2[playerid][gun] == 6)
{
    GivePlayerWeapon(playerid, 38,999999999);
}
if(PlayerInfo2[playerid][gun] == 7)
{
    GivePlayerWeapon(playerid, 38, 100);
}
if(PlayerInfo2[playerid][gun] == 8)
{
    GivePlayerWeapon(playerid, 38, 200);
}
if(PlayerInfo2[playerid][gun] == 9)
{
    GivePlayerWeapon(playerid, 38, 50);
}
if(PlayerInfo2[playerid][gun] == 10)
{
    GivePlayerWeapon(playerid, 35, 2);
}
if(PlayerInfo2[playerid][gun] == 11)
{
    GivePlayerWeapon(playerid, 35,10);
}

}
Its Crashing the Pawno What wrong here ?
Reply
#2

Are you sure in this code pawno crashing?
Reply
#3

Yes after removed it compile fine
Reply
#4

well i check it its not having any errors or mistake but i have little doubt in
pawn Код:
IRC_GroupSay(groupID, IRC_CHANNEL, string2);
GiftLog(string2);
Reply
#5

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
well i check it its not having any errors or mistake but i have little doubt in
pawn Код:
IRC_GroupSay(groupID, IRC_CHANNEL, string2);
GiftLog(string2);
Fixed it Thanks for your help

problem in same Name [gun] already exists
Reply
#6

Ok good enjoy
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)