SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 20/09/2012, 05:28 PM   #1
CrazyChoco
Gangsta
 
CrazyChoco's Avatar
 
Join Date: Feb 2012
Location: Denmark
Posts: 554
Reputation: 8
Default Pawno [SOLVED]

Hai, When i try to add a little bit of code the Pawno compiler crashes, and when i dont have that little code, i will compile fine My code is
pawn Code:
if(IsCopBan[playerid] == 0)
   
        if(gTeam[playerid] == TEAM_COPS)
        {


            GivePlayerWeapon(playerid, 3, 1);
            GivePlayerWeapon(playerid, 22, 500);
            GivePlayerWeapon(playerid, 25, 400);
            GivePlayerWeapon(playerid, 29, 250);
        }
        return 1;
    }

    if(IsCopBan[playerid] == 1)
    {
        SendClientMessage(playerid, -1, "{FF0000}[ATTENTION]{FFFFFF}: You are currently {FF0000}Cop Banned{FFFFFF} and can currently not use this class");
        ForceClassSelection(playerid);
        TogglePlayerSpectating(playerid, true);
        TogglePlayerSpectating(playerid, false);
        return 1;
    }

and i putted it onplayerspawn, but when i run the compiling, it crashes
CrazyChoco is offline   Reply With Quote
Old 20/09/2012, 05:33 PM   #2
RedJohn
Huge Clucker
 
RedJohn's Avatar
 
Join Date: Jul 2012
Location: Mostar, Bosnia and Herzegovina
Posts: 457
Reputation: 52
Default Re: Pawno

pawn Code:
if(IsCopBan[playerid] == 0)
{
    if(gTeam[playerid] == TEAM_COPS)
    {
        GivePlayerWeapon(playerid, 3, 1);
        GivePlayerWeapon(playerid, 22, 500);
        GivePlayerWeapon(playerid, 25, 400);
        GivePlayerWeapon(playerid, 29, 250);
    }
    return 1;
}
if(IsCopBan[playerid] == 1)
{
    SendClientMessage(playerid, -1, "{FF0000}[ATTENTION]{FFFFFF}: You are currently {FF0000}Cop Banned{FFFFFF} and can currently not use this class");
    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid, true);
    TogglePlayerSpectating(playerid, false);
    return 1;
}
__________________
Release name
Link
Dialog creator
Link
String characters counter
Link
Pawno Color Generator
Link
Simple Hospital Helicopter Roof
Link
RedJohn is offline   Reply With Quote
Old 20/09/2012, 05:42 PM   #3
CrazyChoco
Gangsta
 
CrazyChoco's Avatar
 
Join Date: Feb 2012
Location: Denmark
Posts: 554
Reputation: 8
Default Re: Pawno

Thanks
CrazyChoco is offline   Reply With Quote
Old 20/09/2012, 05:46 PM   #4
KyleSmith
High-roller
 
KyleSmith's Avatar
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 1,504
Reputation: 128
Default Re: Pawno [SOLVED]

Always check for missing brackets.
KyleSmith is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pawno bug??? ddnbb Scripting Help 5 20/08/2012 02:30 PM
Pawno help. ChrisBrown95 Help Archive 4 18/01/2011 04:38 PM
Help With Pawno Needed I Changes The Name Becouse it Is Unleading It Was Pawno zzarzzur Help Archive 3 29/01/2010 03:50 AM


All times are GMT. The time now is 03:58 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.