| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- //-_-_-_-_-_-_-_-_-_-_-_-_Neon System By [EDT]Quattro-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
- //-_-_-_-_-_-_-_-_-_-_-_-_-_-Do Not Remove Credits_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
- //-_-_-_-_-_-_-_-_-_-_-_-_-Commands: /neonshop /neon-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
- //-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_Enjoy Using It!-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
- //-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
- #include <a_samp>
- #define COLOR_WHITE 0xFFFFFFAA
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new idx;
- if (strcmp(cmdtext, "/objects", true)==0)
- {
- if(IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Objects Near You:");
- new string[128];
- new Float:X, Float:Y, Float:Z;
- for(new i = 0;i < 10000 ;i++)
- {
- if(IsValidObject(i))
- {
- GetObjectPos(i, X, Y, Z);
- if(IsPlayerInRangeOfPoint(playerid, 10, X, Y, Z))
- {
- format(string, sizeof(string), "%d is near you", i);
- SendClientMessage(playerid, COLOR_WHITE, string);
- }
- }
- }
- }
- return 1;
- }
- if (strcmp(cmdtext, "/delobj", true)==0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new tmp[128];
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /delobj [objectid]");
- }
- new object = strval(tmp);
- if(IsValidObject(object))
- {
- DestroyObject(object);
- }
- }
- }
- return 0;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
|