20.04.2017, 10:46
try this code for destroy personal vehicles
Код:
stock strmatch(const String1[], const String2[]) { if((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1))) { return true; } else { return false; } } Put this code in OnPlayerDisconnect for(new i = 1; i <= GetVehiclePoolSize(); i++) { if(strmatch(xVehicle[i][xv_Sahip], GetName(playerid)) { DestroyVehicle(i); } } stock GetName(playerid) { new name[25]; if(playerid == INVALID_PLAYER_ID) format(name, 25, "Unknow"); else GetPlayerName(playerid, name, 25); return name; }