19.06.2014, 16:04
i wanted to delete vehicle when onplayerdisconnect but im getting an error :/
this is the error:
this is the error:
pawn Код:
C:\Users\----\---\--\filterscripts\puntest.pwn(900) : error 035: argument type mismatch (argument 1)
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new playername[24];
GetPlayerName(playerid, playername, sizeof(playername));
for(new i=1; i < MAX_PUNVEHICLES; i++)
{
if(VehicleCreated[i] == VEHICLE_PLAYER && strcmp(VehicleOwner[i], playername) == 0)
{
DestroyVehicle(VehicleOwner[i]); //destroy it.
print("A vehicle has been deleted");
}
}
return 1;
}