Advertisement
OKStyle

Sex

Mar 14th, 2011
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 7.08 KB | None | 0 0
  1. #include <a_samp>
  2. // Sex 1.1 by O.K.Style™
  3. new wantkiss[MAX_PLAYERS];
  4. new wantsex[MAX_PLAYERS];
  5. public OnPlayerCommandText(playerid, cmdtext[])
  6. {
  7.     new cmd[256], idx, tmp[30];
  8.     cmd = strtok(cmdtext, idx);
  9.  
  10.     if(strcmp(cmd, "/pocelui", true) == 0)
  11.     {
  12.         new
  13.             PlayerName[30],
  14.             string[256]
  15.         ;
  16.         tmp = strtok(cmdtext, idx);
  17.         new otherplayer = strval(tmp);
  18.         if(GetDistanceBetweenPlayers(playerid, otherplayer) > 2) return SendClientMessage(playerid, 0xFF0000AA, "Вы слишком далеко!");
  19.         if(IsSkinFemale(otherplayer) && !IsSkinFemale(playerid))
  20.         {
  21.             wantkiss[playerid] = 1;
  22.             wantkiss[otherplayer] = 1;
  23.             GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
  24.             format(string, sizeof(string), "Игрок %s предлагает вам поцеловаться. (/accpoc [id] - принять, /dispoc [id] - отказать)",PlayerName);
  25.             SendClientMessage(otherplayer, 0xFFFF00AA, string);
  26.         }
  27.         else return SendClientMessage(playerid, 0xFF0000AA, "Ваш оппонент такого же пола!");
  28.         return 1;
  29.     }
  30.     if(strcmp(cmd, "/accpoc", true) == 0)
  31.     {
  32.         tmp = strtok(cmdtext, idx);
  33.         new otherplayer = strval(tmp);
  34.         if(wantkiss[playerid] == 0 || wantkiss[otherplayer] == 0) return SendClientMessage(playerid, 0x00FF00AA, "Вам не предлагали целоваться!");
  35.         if(GetDistanceBetweenPlayers(playerid, otherplayer) > 2) return SendClientMessage(playerid, 0xFF0000AA, "Вы слишком далеко!");
  36.         SendClientMessage(playerid, 0x00FF00AA, " Вы поцеловались!");
  37.         SendClientMessage(otherplayer, 0x00FF00AA, "Вы поцеловались!");
  38.         wantkiss[playerid] = 0;
  39.         ApplyAnimation(otherplayer, "KISSING", "Grlfrd_Kiss_03", 4.1, 0, 1, 1, 1, 1, 1);
  40.         ApplyAnimation(playerid, "KISSING", "Grlfrd_Kiss_03", 4.1, 0, 1, 1, 1, 1, 1);
  41.         wantkiss[otherplayer] = 0;
  42.         return 1;
  43.     }
  44.     if(strcmp(cmd, "/dispoc", true) == 0)
  45.     {
  46.         tmp = strtok(cmdtext, idx);
  47.         new otherplayer = strval(tmp);
  48.         if(GetDistanceBetweenPlayers(playerid, otherplayer) > 2) return SendClientMessage(playerid, 0xFF0000AA, "Вы слишком далеко!");
  49.         if(wantkiss[playerid] == 0 || wantkiss[otherplayer] == 0) return SendClientMessage(playerid, 0x00FF00AA, "Вам не предлагали целоваться!");
  50.         SendClientMessage(playerid, 0xFF0000AA, "Вы отказались поцеловаться!");
  51.         SendClientMessage(otherplayer, 0x00FF00AA, "С вами отказались поцеловаться!");
  52.         wantkiss[playerid] = 0;
  53.         wantkiss[otherplayer] = 0;
  54.         return 1;
  55.     }
  56.     if(strcmp(cmd, "/iznas", true) == 0)
  57.     {
  58.         tmp = strtok(cmdtext,idx);
  59.         new otherplayer = strval(tmp);
  60.         if(GetDistanceBetweenPlayers(playerid, otherplayer) > 2) return SendClientMessage(playerid, 0xFF0000AA, "Вы слишком далеко!");
  61.         if(IsSkinFemale(otherplayer))
  62.         {
  63.             SendClientMessage(playerid, 0xFF0000AA, "Вы изнасиловали игрока!");
  64.             SendClientMessage(otherplayer, 0x00FF00AA, "Вас изнасиловали!");
  65.             LoopingAnim(otherplayer, "SNM", "SPANKINGW", 4.1, 0, 1, 1, 1, 1, 1);
  66.             LoopingAnim(playerid, "SNM", "SPANKEDW", 4.1, 0, 1, 1, 1, 1, 1);
  67.         }
  68.         else return SendClientMessage(playerid, 0xFF0000AA, "Ваш оппонент такого же пола!");
  69.         return 1;
  70.     }
  71.     if(strcmp(cmd, "/sexon", true) == 0)
  72.     {
  73.         new
  74.             PlayerName[MAX_PLAYER_NAME],
  75.             string[128]
  76.         ;
  77.         tmp = strtok(cmdtext,idx);
  78.         new otherplayer = strval(tmp);
  79.         if(GetDistanceBetweenPlayers(playerid, otherplayer) > 2) return SendClientMessage(playerid, 0xFF0000AA, "Вы слишком далеко!");
  80.         if(IsSkinFemale(otherplayer))
  81.         {
  82.             wantsex[playerid] = 1;
  83.             wantsex[otherplayer] = 1;
  84.             GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
  85.             format(string, sizeof(string), "Игрок %s предлагает вам заняться сексом. (/accsex [id] - принять, /dissex [id] - отказать)",PlayerName);
  86.             SendClientMessage(otherplayer, 0xFFFF00AA, string);
  87.         }
  88.         else return SendClientMessage(playerid, 0xFF0000AA, "Ваш оппонент такого же пола!");
  89.         return 1;
  90.     }
  91.     if(strcmp(cmd, "/accsex", true) == 0)
  92.     {
  93.         tmp = strtok(cmdtext,idx);
  94.         new otherplayer = strval(tmp);
  95.         if(wantsex[playerid] == 0 || wantsex[otherplayer] == 0) return SendClientMessage(playerid, 0x00FF00AA, "Вам не предлагали заняться сексом!");
  96.         if(GetDistanceBetweenPlayers(playerid, otherplayer) > 2) return SendClientMessage(playerid, 0xFF0000AA, "Вы слишком далеко!");
  97.         {
  98.             SendClientMessage(playerid, 0x00FF00AA, "Вы занялись сексом!");
  99.             SendClientMessage(otherplayer, 0x00FF00AA, "Вы занялись сексом!");
  100.             wantsex[playerid] = 0;
  101.             wantsex[otherplayer] = 0;
  102.             ApplyAnimation(otherplayer, "SNM", "SPANKING_IDLEW", 4.1, 0, 1, 1, 1, 1, 1);
  103.             LoopingAnim(playerid, "SNM", "SPANKINGP", 4.1, 0, 1, 1, 1, 1, 1);
  104.         }
  105.         return 1;
  106.     }
  107.     if(strcmp(cmd, "/dissex ", true) == 0)
  108.     {
  109.         tmp = strtok(cmdtext,idx);
  110.         new otherplayer = strval(tmp);
  111.         if(wantsex[playerid] == 0 || wantsex[otherplayer] == 0) return SendClientMessage(playerid, 0x00FF00AA, "Вам не предлагали заняться сексом!");
  112.         if(GetDistanceBetweenPlayers(playerid, otherplayer) > 2) return SendClientMessage(playerid, 0xFF0000AA, "Вы слишком далеко!");
  113.         SendClientMessage(playerid, 0xFF0000AA, "Вы отказались заняться сексом!");
  114.         SendClientMessage(otherplayer, 0x00FF00AA, "С вами отказались заняться сексом!");
  115.         wantsex[playerid] = 0;
  116.         wantsex[otherplayer] = 0;
  117.         return 1;
  118.     }
  119.     return 0;
  120. }
  121. LoopingAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp, sync)
  122. {
  123.     ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp, sync);
  124. }
  125. stock GetDistanceBetweenPlayers(playerid, playerid2)
  126. {
  127.     new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  128.     new Float:tmpdis;
  129.     GetPlayerPos(playerid,x1,y1,z1);
  130.     GetPlayerPos(playerid2,x2,y2,z2);
  131.     tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  132.     return floatround(tmpdis);
  133. }
  134. stock IsSkinFemale(skinid)
  135. {
  136.     new Skins[] = {
  137.     9, 10, 11, 12, 13, 31, 39, 40, 41, 54, 55,
  138.     56, 63, 64, 69, 75, 76, 77, 85, 86, 87,
  139.     88, 89, 90, 92, 93, 129, 130, 131, 138,
  140.     140, 141, 145, 148, 150, 151, 152, 157,
  141.     169, 172, 178, 190, 191, 192, 193, 194,
  142.     195, 196, 197, 198, 199, 201, 205, 207,
  143.     211, 214, 215, 216, 218, 219, 224, 225,
  144.     226, 231, 232, 233, 237, 238, 243, 244,
  145.     245, 246, 251, 256, 257, 263, 298
  146.     };
  147.     for(new i = 0; i < sizeof(Skins); i++)
  148.     {
  149.         if(skinid == i) return 1;
  150.     }
  151.     #pragma unused Skins
  152. return 0;
  153. }
  154. strtok(const string[], &index)
  155. {
  156.     new length = strlen(string);
  157.     while ((index < length) && (string[index] <= ' ')) index++;
  158.     new offset = index, result[20];
  159.     while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  160.     {
  161.         result[index - offset] = string[index];
  162.         index++;
  163.     }
  164.     result[index - offset] = EOS;
  165.     return result;
  166. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement