Advertisement
Guest User

need read

a guest
Nov 22nd, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. // Setup local variables
  2. new Name[MAX_PLAYER_NAME], NewPlayerMsg[128], HouseID;
  3.  
  4. // Setup a PVar to allow cross-script money-transfers (only from filterscript to this mainscript) and scorepoints
  5. SetPVarInt(playerid, "PVarMoney", 0);
  6. SetPVarInt(playerid, "PVarScore", 0);
  7.  
  8. // Get the playername
  9. GetPlayerName(playerid, Name, sizeof(Name));
  10. // Also store this name for the player
  11. GetPlayerName(playerid, APlayerData[playerid][PlayerName], 24);
  12.  
  13. // Send a message to all players to let them know somebody else joined the server
  14. format(NewPlayerMsg, 128, TXT_PlayerJoinedServer, Name, playerid);
  15. SendClientMessageToAll(0xFFFFFFFF, NewPlayerMsg);
  16.  
  17. // Try to load the player's datafile ("PlayerFile_Load" returns "1" is the file has been read, "0" when the file cannot be read)
  18. // Check if the player is still banned
  19.  
  20. if (APlayerData[playerid][BanTime] < gettime()) // Player ban-time is passed
  21. ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, TXT_DialogLoginTitle, TXT_DialogLoginMsg, TXT_DialogLoginButton1, TXT_DialogButtonCancel);
  22. else // Player is still banned
  23. {
  24. ShowRemainingBanTime(playerid); // Show the remaining ban-time to the player is days, hours, minutes, seconds
  25. Kick(playerid); // Kick the player
  26. }
  27. }
  28. else
  29. ShowPlayerDialog(playerid, DialogRegister, DIALOG_STYLE_INPUT, TXT_DialogRegisterTitle, TXT_DialogRegisterMsg, TXT_DialogRegisterButton1, TXT_DialogButtonCancel);
  30.  
  31. // The houses have been loaded but not the cars, so load all vehicles assigned to the player's houses
  32. for (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++)
  33. {
  34. // Get the HouseID from this slot
  35. HouseID = APlayerData[playerid][Houses][HouseSlot];
  36. // Check if there is a house in this slot
  37. if (HouseID != 0)
  38. HouseFile_Load(HouseID, true); // Load the cars of the house
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement