piss in other player
#1

Hello guys.

I want to do a piss command so when i'm near a player and i type /piss, in the chatbox will say * player pissed on player.
Reply
#2

This might be good for you.

http://forum.sa-mp.com/showthread.ph...light=defecate
Reply
#3

its not this
Reply
#4

pawn Код:
COMMAND:piss(playerid)
{
    SetPlayerSpecialAction(//so on
    new Float:pXPos,Float:pYPos,Float:pZPos;
    new pName[MAX_PLAYER_NAME],STR[90];
    GetPlayeraName(playerid, pName , sizeof pName);
    format(STR,sizeof STR,"you have been pissed on by: %s",pName);
    for(new i=0; i <MAX_PLAYERS; i++)
    {
          if(!IsPlayerConnected(i)) continue;
          GetPlayerPos(i, pXPos,pYPos,pZPos);
          if(IsPlayerInRangeOfPoint(i,5.00,pXPos,pYPos,pZPos)){
               new OtherName[MAX_PLAYER_NAME];GetPlayerName(i,OtherName, sizeof OtherName);
               format(STR,sizeof STR,"%s has been pissed on by: %s",OtherName,pName);
               SendClientMessageToAll(-1,STR);
               return 1;
          }
    }
   
}
On the iPad so migh be mistake here & there
Reply
#5

Piss IN? Sounds intimate.

@park4bmx just because they're NEAR a player doesn't mean they pissed on them. IMO the message should only show if it's directly ON the player (as in, '/piss [id/name]').
Reply
#6

Is this somewhere close of what you mean?
pawn Код:
CMD:piss(playerid,params[])
    {

        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,X,Y,Z);
        for(new i = 0; i < MAX_PLAYERS; I++)
        {
            new name[MAX_PLAYER_NAME],string[128];
            new slapper[MAX_PLAYER_NAME];
            GetPlayerName(i,name,sizeof(name));
            GetPlayerName(playerid,slapper,sizeof(slapper));
            if(IsPlayerInRangeOfPoint(i,1.5,X,Y,Z)
            {
                format(string,sizeof(string),"%s is pissing on %s.",slapper,name);
                SendClientMessageToAll(0xFF4000,string);
                // Do your animation here.
            }
        }
        return 1;

    }
EDIT: Late!
Reply
#7

Quote:
Originally Posted by MP2
Посмотреть сообщение
@park4bmx just because they're NEAR a player doesn't mean they pissed on them. IMO the message should only show if it's directly ON the player (as in, '/piss [id/name]').
can't you read ?

Quote:
Originally Posted by ScRipTeRi
Посмотреть сообщение
a piss command so when i'm near a player and i type /piss.
Reply
#8

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
can't you read ?
You should learn to read before you make comments like that.
Reply
#9

Quote:
Originally Posted by Goldilox
Посмотреть сообщение
Is this somewhere close of what you mean?
pawn Код:
CMD:piss(playerid,params[])
    {

        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,X,Y,Z);
        for(new i = 0; i < MAX_PLAYERS; I++)
        {
            new name[MAX_PLAYER_NAME],string[128];
            new slapper[MAX_PLAYER_NAME];
            GetPlayerName(i,name,sizeof(name));
            GetPlayerName(playerid,slapper,sizeof(slapper));
            if(IsPlayerInRangeOfPoint(i,1.5,X,Y,Z)
            {
                format(string,sizeof(string),"%s is pissing on %s.",slapper,name);
                SendClientMessageToAll(0xFF4000,string);
                // Do your animation here.
            }
        }
        return 1;

    }
EDIT: Late!
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(1485) : warning 219: local variable "name" shadows a variable at a preceding level
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(1485) : warning 219: local variable "string" shadows a variable at a preceding level
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(1490) : error 001: expected token: ")", but found "{"
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(3186) : warning 217: loose indentation
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(3193) : warning 217: loose indentation
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(3194) : warning 217: loose indentation
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(3200) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#10

u just think u know it all ;X
Quote:

the message should only show

the guy was telling me how it needs to be done, and event states the wrong thing.
Then u come in cuz u have nothing to do, simply if your not helping anyone just don't reply!

Quote:
Originally Posted by ScRipTeRi
Посмотреть сообщение
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(1485) : warning 219: local variable "name" shadows a variable at a preceding level
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(1485) : warning 219: local variable "string" shadows a variable at a preceding level
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(1490) : error 001: expected token: ")", but found "{"
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(3186) : warning 217: loose indentation
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(3193) : warning 217: loose indentation
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(3194) : warning 217: loose indentation
D:\Documents and Settings\real\Desktop\SFT 1.6\filterscripts\Zadmin4.2.pwn(3200) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Use my code !
the code from that guy, well he copied mine change a few things because i missed a bracket he missed one as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)