SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 19/05/2012, 04:51 PM   #21
ℓмяαη_кнαη
Little Clucker
 
ℓмяαη_кнαη's Avatar
 
Join Date: May 2012
Location: Karachi - pk
Posts: 44
Reputation: 2
Default Re: Making A Class System(Very Simple+Easy+Dialogs+Texts)

Realy nice tutorial
ℓмяαη_кнαη is offline   Reply With Quote
Old 19/05/2012, 05:12 PM   #22
$$inSane
Gangsta
 
$$inSane's Avatar
 
Join Date: Feb 2012
Location: Somewhere in India
Posts: 596
Reputation: 30
Default Re: Making A Class System(Very Simple+Easy+Dialogs+Texts)

thnx
__________________
Be Honest to me !
$$inSane is offline   Reply With Quote
Old 21/05/2012, 09:05 AM   #23
$$inSane
Gangsta
 
$$inSane's Avatar
 
Join Date: Feb 2012
Location: Somewhere in India
Posts: 596
Reputation: 30
Default Re: Making A Class System(Very Simple+Easy+Dialogs+Texts)

topic updated
think so its well explaned now
__________________
Be Honest to me !
$$inSane is offline   Reply With Quote
Old 23/05/2012, 12:56 PM   #24
[GF]Logic
Gangsta
 
[GF]Logic's Avatar
 
Join Date: Feb 2012
Posts: 517
Reputation: 27
Default Re: Making A Class System(Very Simple+Easy+Dialogs+Texts)

Well To be honest you need to explain abit more and you shouldn't ask for rep people would give you it if you deserve it
__________________
Quote:
If you won't Respect my Religion I won't respect your's
[GF]Logic is offline   Reply With Quote
Old 23/05/2012, 02:20 PM   #25
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,646
Reputation: 185
Default Re: Making A Class System(Very Simple+Easy+Dialogs+Texts)

Decent tutorial, good job
__________________

GAMINGFREAK
YouTube | Twitter | Facebook
----------------------------------

Github Profile | City Life Role Play
Luis- is online now   Reply With Quote
Old 24/05/2012, 09:54 AM   #26
$$inSane
Gangsta
 
$$inSane's Avatar
 
Join Date: Feb 2012
Location: Somewhere in India
Posts: 596
Reputation: 30
Default Re: Making A Class System(Very Simple+Easy+Dialogs+Texts)

Quote:
Originally Posted by -Luis View Post
Decent tutorial, good job
thnx
__________________
Be Honest to me !
$$inSane is offline   Reply With Quote
Old 04/07/2012, 05:55 PM   #27
Coder_
Big Clucker
 
Join Date: Jul 2012
Posts: 74
Reputation: 1
Default Re: Making A Class System(Very Simple+Easy+Dialogs+Texts)

I have one error
******.pwn(429) : warning 217: loose indentation
pawn Code:
if(dialogid == 999)
            {
                if(response)
                    {
                if(listitem == 0)
                    {
                    if(GetPlayerScore(playerid) >= 0)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "You chose the Zombie as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Zombie Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}Knife\n{FFFFFF}Chainsaw", "Play","");
                        gPlayerClass[playerid] = Zombie;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        ResetPlayerWeapons(playerid);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 9, 1);
                        }
                    }

                if(listitem == 1)
                    {
                    if(GetPlayerScore(playerid) >= 1)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "You chose the Sniper as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Sniper Class:", "{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife", "Play","");
                            gPlayerClass[playerid] = Human;
                            PickedClass[playerid] = 1;
                            RemovePlayerMapIcon(playerid, 0);
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            ResetPlayerWeapons(playerid);
                            GivePlayerWeapon(playerid, 12, 250);
                            GivePlayerWeapon(playerid, 29, 250);
                            GivePlayerWeapon(playerid, 4, 1);
                        }

                    }
                return 1;
        }

    return 1;//line 429
}
return true;
}
¨
How i can fix this?
Coder_ is offline   Reply With Quote
Old 07/07/2012, 09:33 AM   #28
$$inSane
Gangsta
 
$$inSane's Avatar
 
Join Date: Feb 2012
Location: Somewhere in India
Posts: 596
Reputation: 30
Default Re: Making A Class System(Very Simple+Easy+Dialogs+Texts)

Quote:
Originally Posted by Coder_ View Post
I have one error
******.pwn(429) : warning 217: loose indentation
pawn Code:
if(dialogid == 999)
            {
                if(response)
                    {
                if(listitem == 0)
                    {
                    if(GetPlayerScore(playerid) >= 0)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "You chose the Zombie as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Zombie Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}Knife\n{FFFFFF}Chainsaw", "Play","");
                        gPlayerClass[playerid] = Zombie;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        ResetPlayerWeapons(playerid);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 9, 1);
                        }
                    }

                if(listitem == 1)
                    {
                    if(GetPlayerScore(playerid) >= 1)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "You chose the Sniper as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Sniper Class:", "{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife", "Play","");
                            gPlayerClass[playerid] = Human;
                            PickedClass[playerid] = 1;
                            RemovePlayerMapIcon(playerid, 0);
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            ResetPlayerWeapons(playerid);
                            GivePlayerWeapon(playerid, 12, 250);
                            GivePlayerWeapon(playerid, 29, 250);
                            GivePlayerWeapon(playerid, 4, 1);
                        }

                    }
                return 1;
        }

    return 1;//line 429
}
return true;
}
¨
How i can fix this?

sorry i cant help as i am accessing net on TV
i will help after 2/3 hours
__________________
Be Honest to me !
$$inSane is offline   Reply With Quote
Old 07/07/2012, 09:54 AM   #29
Jarnu
Guest
 
Posts: n/a
Default Re: Making A Class System(Very Simple+Easy+Dialogs+Texts)

$$Insane
You can better do this
Except a big long one
pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Float:PosX,Float:PosY,Float:PosZ,model = GetVehicleModel(vehicleid);
if(model == 425)//Hunter
    {
        if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] != PILOT)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hunter!");
        }
    }
    return 1;
}
and except that.. SetPlayerPos and GetPlayerPos
pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new model = GetVehicleModel(vehicleid);
if(model == 425)//Hunter
    {
        if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] != PILOT) //if the player is not Pilot
        {//then
            RemovePlayerFromVehicle(playerid); //removes player from vehicle if he is not Pilot
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hunter!");
        }
    }
    return 1;
}
use RemovePlayerFromVehicle
OnTopic:

a Very decent and good tutorial. helped me in starting up my TDM script..
  Reply With Quote
Old 07/07/2012, 11:35 AM   #30
$$inSane
Gangsta
 
$$inSane's Avatar
 
Join Date: Feb 2012
Location: Somewhere in India
Posts: 596
Reputation: 30
Default Re: Making A Class System(Very Simple+Easy+Dialogs+Texts)

this will remove the pilot instead of other classes amd yup i made it likly COD5 and i m going to release a gamemode same like COD5
__________________
Be Honest to me !
$$inSane is offline   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
[Tutorial] A simple registration & login system with Dialogs - Using DOF2 SmiT Tutorials 17 01/07/2013 07:41 AM
[FilterScript] Simple fighting system with dialogs (will do soon one with wasting cash and another without dialogs) Marsigne Filterscripts 20 24/05/2012 08:33 PM
Making a simple cop system ricardo178 Scripting Help 6 24/02/2012 03:19 PM
[Tutorial] Making an easy /pay [playerid/name] [amount] system knackworst Tutorials 23 20/11/2011 03:42 PM


All times are GMT. The time now is 11:42 PM.


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