29.07.2010, 16:30
Код:
if(strcmp(cmd, "/sex", true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /sex [playerid/PartOfName]"); return 1; } if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { SendClientMessage(playerid, COLOR_GRAD1, " You have to be a passenger of a car, who else is gonna drive?"); return 1; } new target = strval(tmp); if (target == playerid) { SendClientMessage(target, COLOR_GRAD1, " You cant have sex with yourself... well you can but..."); return 1; } new playa; new Float:shealth; if(IsStringAName(tmp)) { playa = GetPlayerID(tmp); } else { playa = strval(tmp); } GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { GetPlayerHealth(playa, shealth); SetPlayerHealth(playa, shealth+5); GiveMoney(playa, -20); // take money from GiveMoney(playerid, 20); // take money from hooker SendClientMessage(playa, COLOR_GRAD1, " She's giving you so much pleasure you blow +5hp"); SendClientMessage(playerid, COLOR_GRAD1, " His dick feels good..."); format(string, sizeof(string), "%s is having hot sex with %s", giveplayer, sendername); ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } return 1; }