Guest User

Untitled

a guest
Jun 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. public OnGameModeInit()
  4. {
  5. if(fexist("Plakalar.txt"))
  6. {
  7. new File:dosya=fopen("Plakalar.txt",io_read);
  8. new str[30],i,Float:X, Float:Y, Float:Z;
  9. while(fread(dosya,str))
  10. {
  11. GetVehiclePos(i, X, Y, Z);
  12. SetVehicleNumberPlate(i, str);
  13. SetVehicleToRespawn(i);
  14. SetVehiclePos(i, X, Y, Z);
  15. i++;
  16. }
  17. }
  18. return 1;
  19. }
  20.  
  21. public OnPlayerCommandText(playerid, cmdtext[])
  22. {
  23. if(strcmp("/araclaraplakaver", cmdtext, true) == 0)
  24. {
  25. if(IsPlayerAdmin(playerid)){
  26. new File:dosya=fopen("Plakalar.txt",io_write);
  27. new Float:X, Float:Y, Float:Z,str[20];
  28. for(new ar; ar < MAX_VEHICLES+1; ar++)
  29. {
  30. new plaka = random(9999);
  31. format(str, 20, "LS%d\r\n", plaka);
  32. if(GetVehicleModel(ar)!=0)
  33. {
  34. GetVehiclePos(ar, X, Y, Z);
  35. SetVehicleNumberPlate(ar, str);
  36. SetVehicleToRespawn(ar);
  37. SetVehiclePos(ar, X, Y, Z);
  38. }
  39. fwrite(dosya,str);
  40. }
  41. fclose(dosya);
  42. } else { SendClientMessage(playerid, -1, "(( Bu komutu kullanabilmek için RCON Admin olmalısınız! ))"); }
  43. return 1;
  44. }
  45. return 0;
  46. }
Add Comment
Please, Sign In to add comment