How to Fix This??
#2

You are deleting the object before you check if its valid or not so obviously it won't be valid as the object has already been deleted!!
Use this :
PHP код:
if(sscanf(params"i",id)) return SendClientMessage(playerid,yellow,"Usage: /delobject <Object ID>");
if(!
IsValidObject(id)) return SendClientMessage(playerid,red"Error: Invalid object!");// PLACE THIS LINE HERE NOT AFTER FORMAT
DestroyObject(id);
CommandToAdmins(playerid,"delobject");
format(Jstringsizeof(Jstring), "You have deteled the Object ID: '%d'"id);
return 
SendClientMessage(playerid,yellowJstring); 
Reply


Messages In This Thread
How to Fix This?? - by RedRex - 18.11.2016, 19:07
Re: How to Fix This?? - by BroZeus - 19.11.2016, 06:34
Re: How to Fix This?? - by Micko123 - 19.11.2016, 07:29
Re: How to Fix This?? - by RedRex - 19.11.2016, 10:09
Re: How to Fix This?? - by RedRex - 19.11.2016, 13:42
Re: How to Fix This?? - by jlalt - 19.11.2016, 13:57
Re: How to Fix This?? - by RedRex - 19.11.2016, 14:00

Forum Jump:


Users browsing this thread: 3 Guest(s)