Reserved Cars
#1

i want to know that how can i make reserved cars if you know please help me

Thank You!
Reply
#2

Hope it helps
pawn Код:
ifVEHICLENAMEHERE(vehicleid) = PlayerInfo[playerid]pINFO])
            {
            new Float:pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SendClientMessage(playerid, COLOR_RED, " This vehicle is restricted to ______");
Reply
#3

but were i should copy paste

When i copy paste it showed error the error

Код:
C:\Documents and Settings\Administrator\Desktop\My Own Server !\pawno\include\zcmd.inc(90) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\My Own Server !\gamemodes\SBX.pwn(1897) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\My Own Server !\gamemodes\SBX.pwn(1900) : error 021: symbol already defined: "GetPlayerPos"
C:\Documents and Settings\Administrator\Desktop\My Own Server !\gamemodes\SBX.pwn(1903) : warning 203: symbol is never used: "pos"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#4

[i]This code is not special, but this shows you how to create a Reserved Vehicle System[Static]

pawn Код:
new ReservedCar[1] //create a variable

public OnGameModeInit()
{
    ReservedCar[0] = CreateVehicle( ... ); //Vehicle Position & Stuff
    return true;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(ispassenger) return 0;
    if(vehicleid == ReservedCar[0])
    {
        if(!strcmp(name, "Your_Name", true))
        {
            SendClientMessage(playerid, -1, #Permission Granted, You may drive this vehicle around.);
        }
        else
        {
            SendClientMessage(playerid, -1, #Permission Denied, You may not drive this vehicle around.);
        }
    }
    return true;
}
Reply
#5

Thank You.!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)