Advertisement
Shiny_

Untitled

Feb 9th, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.82 KB | None | 0 0
  1. #define FILTERSCRIPT
  2. char CLEAN[] = "jest czyste, może grać.";
  3. char NOT_CLEAN[] = "wywołuje AIDS i raka.";
  4.  
  5. char PlayerName(int playerid) {
  6.     char Name[MAX_PLAYER_NAME];
  7.     GetPlayerName(playerid, Name, sizeof(Name));
  8.     return * Name;
  9. }
  10.  
  11. SAMPGDK_CALLBACK_EXPORT bool SAMPGDK_CALLBACK_CALL OnPlayerDisconnect(int playerid, int reason) {
  12.     StopAudioStreamForPlayer(playerid);
  13.     return true;
  14. }
  15.  
  16. SAMPGDK_CALLBACK_EXPORT bool SAMPGDK_CALLBACK_CALL OnPlayerText(int playerid, const char * text) {
  17.     char __Text[200];
  18.     sprintf(__Text, "%s: %s", PlayerName(playerid), text);
  19.     SendClientMessage(playerid, -1, __Text);
  20.     printf(__Text);
  21.     return false;
  22. }
  23.  
  24. SAMPGDK_CALLBACK_EXPORT void SAMPGDK_CALLBACK_CALL OnClientCheckResponse(int playerid, int actionid, int memaddr, int retndata) {
  25.     printf("Sprawdzanie gracza %s:\n%d\n%d\n%d\n%d\n%d", PlayerName(playerid), playerid, actionid, memaddr, NULL, retndata);
  26.     switch(retndata) {
  27.         case 0xA0: printf("GTA gracza %s %s", PlayerName(playerid), CLEAN), SendClientMessage(playerid, -1, "Twoje GTA jest czyste, zapraszamy do gry."); break;
  28.         default: printf("GTA gracza %s %s", PlayerName(playerid), NOT_CLEAN),
  29.             SendClientMessage(playerid, -1, "Twoje GTA ma zainstalowany pewien dodatek, który wywołuje wirusy i AIDS. Już to naprawiamy..."),
  30.             PlayAudioStreamForPlayer(playerid, "http://alldev.eu/html/mp3/Alabare%20a%20mi%20Senor.mp3", 0.0, 0.0, 0.0, 0.0, false);
  31.     }
  32. }
  33.  
  34. SAMPGDK_CALLBACK_EXPORT unsigned int SAMPGDK_CALLBACK_CALL Supports() {
  35.     return sampgdk_Supports() | SUPPORTS_PROCESS_TICK;
  36. }
  37.  
  38. SAMPGDK_CALLBACK_EXPORT bool SAMPGDK_CALLBACK_CALL Load(void **ppData) {
  39.     return sampgdk_Load(ppData);
  40. }
  41.  
  42. SAMPGDK_CALLBACK_EXPORT void SAMPGDK_CALLBACK_CALL Unload() {
  43.     sampgdk_Unload();
  44. }
  45.  
  46. SAMPGDK_CALLBACK_EXPORT void SAMPGDK_CALLBACK_CALL ProcessTick() {
  47.     sampgdk_ProcessTick();
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement