PutPlayerInVehicle[Rep]
#1

Little (stupid) question about PutPlayerInVehicle.

I havent scripted for a long time and now im tryining to remember stuff again... my problem is this.
When you got high enought killstreak, you can spawn a RC car. I tried to use PutPlayerInVehicle but I cannot
remember the right way.

pawn Code:
new RCcar[MAX_PLAYERS];
pawn Code:
if (strcmp("/ks 5", cmdtext, true, 10) == 0)
    {
        if(killstreak[playerid] == 8)
        {
            new Float:x, Float:y, Float:z;
            GetPlayerPos(playerid,x,y,z);
            RCcar = CreateVehicle(464,x,y,z, 0, 0, 3, 999999999);
            PutPlayerInVehicle(playerid, RCcar, 0);
            killstreak[playerid] = 0;
            SendClientMessage(playerid, COLOR_RED, "You have used your killstreak to get a RC car");
            SendClientMessage(playerid, COLOR_RED, "You have 120 seconds before your vehicle will blow.");
        }
    }
    return 1;
}
errors:
pawn Code:
H:\Pawno\pawno\LS.pwn(446) : error 033: array must be indexed (variable "RCcar")
H:\Pawno\pawno\LS.pwn(447) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Lines 466 & 467 are:
pawn Code:
RCcar = CreateVehicle(464,x,y,z, 0, 0, 3, 99999999999);
PutPlayerInVehicle(playerid, RCcar, 0);
Thank you for your time!
Reply


Messages In This Thread
PutPlayerInVehicle[Rep] - by GNGification - 07.03.2012, 13:46
Re: PutPlayerInVehicle[Rep] - by Shabi RoxX - 07.03.2012, 13:50
Re: PutPlayerInVehicle[Rep] - by Burridge - 07.03.2012, 13:51
Re: PutPlayerInVehicle[Rep] - by GNGification - 07.03.2012, 13:57
Re: PutPlayerInVehicle[Rep] - by livests - 07.03.2012, 20:05
Re: PutPlayerInVehicle[Rep] - by CAR - 07.03.2012, 20:08

Forum Jump:


Users browsing this thread: 3 Guest(s)