Quote:
Originally Posted by Abagail
Code:
public OnPlayerDisconnect(playerid, reason)
{
if(!IsPlayerInAnyVehicle) return 0;
DestroyVehicle(GetPlayerVehicleID(playerid));
return 1;
}
OnPlayerExitVehicle(p...)
{
SetTimerEx("DestroyVehicle", 10000, false, "i", playerid);
SetPVarInt(playerid, "DestroyVehicle", vehicleid)
}
return 1;
}
OnPlayerDeath
{
if(!IsPlayerInAnyVehicle) return 0;
DestroyVehicle(GetPlayerVehicleID(playerid));
}
public DestroyVehicle(playerid)
{
new vehicleid == GetPVarInt(playerid, "DestroyVehicle");
DestroyVehicle(vehicleid);
}
Untested.
|
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(150) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(167) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(183) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(213) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(260) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(6709) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(9456) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(9470) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(9485) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(9499) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(9746) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(9947) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(9954) : error 021: symbol already defined: "DestroyVehicle"
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(9956) : error 001: expected token: ";", but found "=="
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(9961) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\MaHdy\Desktop\SPA Server original\gamemodes\SPA.pwn(10279) : warning 203: symbol is never used: "vehicleid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.