[Tutorial] Making A Class System(Very Simple+Easy+Dialogs+Texts)
#14

Quote:
Originally Posted by iOmar
View Post
In$$ane there is something is not valid...
pawn Code:
new vehicleid = GetPlayerVehicleID(playerid);//variable to get vehicle ids
    if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == PILOT)//if player is pilot
    {
        SendClientMessage(playerid, COLOR_RED, "You Need to  be a Pilot to fly Hunter");//messages goes to the player that he can't drive the hunter
        RemovePlayerFromVehicle(playerid);//get u off from the hunter
    }
This will remover pilot from hunter not other classes.
This should be this:

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] == ASSAULT)
        {//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!");
        }
    }
    if(model == 425)//Hunter
    {
        if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == SNIPER)
        {//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!");
        }
    }
    if(model == 425)//Hunter
    {
        if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == ENGINEER)
        {//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!");
        }
    }
    if(model == 425)//Hunter
    {
        if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == JETTROOPER)
        {//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;
}
This will remove all except pilot class member...

==> And one more thing i am not understanding your spy system..... Can u tell it clearly?
You do realize that we can easily replace:
pawn Code:
GetPlayerPos(playerid,PosX,PosY,PosZ);
SetPlayerPos(playerid,PosX,PosY,PosZ);
with:
pawn Code:
ClearAnimations(playerid);
Reply


Messages In This Thread
Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 08.05.2012, 15:46
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 08.05.2012, 16:04
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by iOmar - 08.05.2012, 17:02
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 09.05.2012, 08:55
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by JaKe Elite - 09.05.2012, 09:18
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 09.05.2012, 09:28
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by BigETI - 09.05.2012, 11:40
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by iOmar - 09.05.2012, 12:19
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Rudy_ - 09.05.2012, 12:25
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 09.05.2012, 15:07
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by iOmar - 09.05.2012, 17:17
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 10.05.2012, 08:49
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by [ABK]Antonio - 10.05.2012, 09:45
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Slix_ - 10.05.2012, 09:48
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by iOmar - 10.05.2012, 10:21
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 10.05.2012, 13:47
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 14.05.2012, 11:13
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Gangs_Rocks - 19.05.2012, 15:30
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 19.05.2012, 16:08
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by ℓмяαη_кнαη - 19.05.2012, 16:51
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 19.05.2012, 17:12
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 21.05.2012, 09:05
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by [GF]Logic - 23.05.2012, 12:56
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Luis- - 23.05.2012, 14:20
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Coder_ - 04.07.2012, 17:55
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 07.07.2012, 09:33
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 07.07.2012, 14:00
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Lordzy - 07.07.2012, 14:09
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 07.07.2012, 14:13
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Biess - 26.08.2012, 10:47
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by DeadLy™ - 26.08.2012, 17:26
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by JimmyCh - 24.06.2013, 10:43
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Chrisis - 01.07.2013, 07:32
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Mckarlis - 30.07.2013, 22:45
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by qazwsx - 02.08.2013, 09:07
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by qazwsx - 12.08.2013, 04:58
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by usamahifi - 07.02.2015, 18:01
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 09.02.2015, 08:51
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 25.07.2015, 08:42
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Hemeei - 25.07.2015, 09:55
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Snipa - 26.07.2015, 17:12
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by $$inSane - 27.07.2015, 10:09
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Glossy42O - 27.07.2015, 10:18
Re: Making A Class System(Very Simple+Easy+Dialogs+Texts) - by Snipa - 28.07.2015, 01:11

Forum Jump:


Users browsing this thread: 5 Guest(s)