if (strcmp("/cheetah", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid)) {
SendClientMessage(playerid,COLOR_RED,"You are already in a vehicle!");
return 1;
}
if(!IsPlayerInAnyVehicle(playerid)) {
new vehicleid;
new Float:X,Float:Y,Float:Z,Float:Angle;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
GetPlayerVehicleID(playerid);
vehicleid = vehicleid = CreateVehicle(415,X,Y,Z,Angle,-1,-1,600);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
return 1;
}
if (strcmp("/Resetvehicles", cmdtext, true, 10) == 0)
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
}
return 1;
}
//global variable
new bool: gVDestroy[MAX_VEHICLES];
//OnPlayerCommandText
if (strcmp("/cheetah", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid)) {
SendClientMessage(playerid,COLOR_RED,"You are already in a vehicle!");
return 1;
}
new
Float: X,
Float: Y,
Float: Z,
Float: Angle;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
new vehicleid = CreateVehicle(415,X,Y,Z,Angle,-1,-1,600);
PutPlayerInVehicle(playerid, vehicleid, 0);
gVDestroy[vehicleid - 1] = true;
return 1;
}
//OnVehicleSpawn
if(gVDestroy[vehicleid - 1] == true) {
gVDestroy[vehicleid - 1] = false;
DestroyVehicle(vehicleid);
}
This should help you
![]() pawn Код:
pawn Код:
pawn Код:
|
C:\Documents and Settings\...\Desktop\Server_Script\gamemodes\NFS-MW.pwn(329) : error 017: undefined symbol "gVDestroy" C:\Documents and Settings\...\Desktop\Server_Script\gamemodes\NFS-MW.pwn(329) : warning 215: expression has no effect C:\Documents and Settings\...\Desktop\Server_Script\gamemodes\NFS-MW.pwn(329) : error 001: expected token: ";", but found "]" C:\Documents and Settings\...\Desktop\Server_Script\gamemodes\NFS-MW.pwn(329) : error 029: invalid expression, assumed zero C:\Documents and Settings\...\Desktop\Server_Script\gamemodes\NFS-MW.pwn(329) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
329. if(gVDestroy[vehicleid - 1] == true) {
Tryed all that but these error's came out.
Код:
C:\Documents and Settings\...\Desktop\Server_Script\gamemodes\NFS-MW.pwn(329) : error 017: undefined symbol "gVDestroy" C:\Documents and Settings\...\Desktop\Server_Script\gamemodes\NFS-MW.pwn(329) : warning 215: expression has no effect C:\Documents and Settings\...\Desktop\Server_Script\gamemodes\NFS-MW.pwn(329) : error 001: expected token: ";", but found "]" C:\Documents and Settings\...\Desktop\Server_Script\gamemodes\NFS-MW.pwn(329) : error 029: invalid expression, assumed zero C:\Documents and Settings\...\Desktop\Server_Script\gamemodes\NFS-MW.pwn(329) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. pawn Код:
|
new bool: gVDestroy[MAX_VEHICLES];