07.03.2012, 13:46
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.
errors:
Lines 466 & 467 are:
Thank you for your time!
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;
}
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.
pawn Code:
RCcar = CreateVehicle(464,x,y,z, 0, 0, 3, 99999999999);
PutPlayerInVehicle(playerid, RCcar, 0);