Guest User

Slightly modifed Bare Script for SA-MP

a guest
May 27th, 2012
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.26 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. main(){ print("\n\nBare Script\n\n"); }
  4.  
  5. new pName[MAX_PLAYERS][24], zstring[128];
  6. public OnPlayerConnect(playerid)
  7. {
  8.     GetPlayerName(playerid, pName[playerid], 24);
  9.     GameTextForPlayer(playerid,"~w~SA-MP: ~r~Bare Script",5000,5);
  10.     format(zstring, 128, " %s Joined the server", pName[playerid]);
  11.     SendClientMessageToAll(0xFFFF00FF, zstring);
  12.     return 1;
  13. }
  14. public OnPlayerDisconnect(playerid)
  15. {
  16.     for(new i=0; i<24; i++) pName[playerid][i]='\0'; // Clean the pName slot
  17.     return SendClientMessageToAll(0xFFFF00FF, zstring);
  18. }
  19.  
  20. public OnPlayerSpawn(playerid)
  21. {
  22.     SetPlayerInterior(playerid,0);
  23.     TogglePlayerClock(playerid,0);
  24.     SetPlayerPos(playerid,25.4893,-41.4008,12.0234);
  25.     return 1;
  26. }
  27.  
  28. public OnPlayerRequestClass(playerid, classid)
  29. {
  30.     SetPlayerInterior(playerid,14);
  31.     SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
  32.     SetPlayerFacingAngle(playerid, 270.0);
  33.     SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
  34.     SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
  35.     return 1;
  36. }
  37.  
  38. public OnGameModeInit()
  39. {
  40.     SetGameModeText("Bare Script");
  41.     ShowPlayerMarkers(1);
  42.     ShowNameTags(1);
  43.     for(new i=0; i < 300; i++) AddPlayerClass(i,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
  44.     return 1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment