#7

oops with this players not removing from car >

Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new
            v = GetPlayerVehicleID(playerid);
           
        if(v == FireCat)//Checking if the vehicleid matches the FireCat one.
        {
            new name[MAX_PLAYER_NAME];//Where we will store the players name in a 24 size.
            GetPlayerName(playerid,name,MAX_PLAYER_NAME);//Getting the players name and storing it in pName.
            if(strcmp(name,"KAPIL") == 0)//String compare between the users name and the selected name.
            {
                //If the 2 names are the same...
                SendClientMessage(playerid,-1,"Welcome to your car!");
            }
            else//Else if the 2 names don't match....
            {
                RemovePlayerFromVehicle(playerid);//Lets remove him from the vehicle
                SendClientMessage(playerid,-1,"This car is not yours!");
            }
            return 1;
        }
        if(v == OtherCat)//Checking if the vehicleid matches the FireCat one.
        {
            return 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
Help - by Salsa - 07.10.2011, 05:39
Re: Help - by Haydz - 07.10.2011, 05:48
Re: Help - by Backwardsman97 - 07.10.2011, 05:52
Re: Help - by Salsa - 07.10.2011, 06:11
Re: Help - by Salsa - 07.10.2011, 06:15
Re: Help - by Backwardsman97 - 07.10.2011, 06:21
Re: Help - by Salsa - 07.10.2011, 06:26
Re: Help - by Backwardsman97 - 07.10.2011, 22:50
Re: Help - by Salsa - 08.10.2011, 02:27

Forum Jump:


Users browsing this thread: 1 Guest(s)