Local Message after Command
#1

How do i make it so that when i do /pass at this one place it sends a local message saying
Colour = Pink}* %Name% Has opened the door as %sex% passes through it *

pawn Код:
//pass command
    if(strcmp(cmd, "/pass", true) == 0)
    {
    if (IsPlayerInRangeOfPoint(playerid, 3, 2592.5398,2801.1086,10.8203))
    {// marshalls helipad enter
    SafeSetPlayerPos(playerid, 2596.9297,2800.7661,10.8203);
    }
    else if (IsPlayerInRangeOfPoint(playerid, 3, 2596.9297,2800.7661,10.8203))
    {// marshalls helipad exit
    SafeSetPlayerPos(playerid, 2592.5398,2801.1086,10.8203);
    }
Reply
#2

Here you go, take it and ****** for more info:
pawn Код:
new string[256];
format(string, sizeof(string), "%s has opened the... blah blah"GetPlayerName(playerid));
SendClientMessage(playerid, 0xFF6347AA, string);
Reply
#3

Will that work?
Reply
#4

Quote:
Originally Posted by Jack-
Посмотреть сообщение
Will that work?
That will say only the player's name, with the text "has opened ..."
Reply
#5

pawn Код:
new string[128], sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
if (PlayerInfo[playerid][pSex] == 1) // assuming you have pSex in your script
{
    format(string, sizeof(string), "%s opens the door as he passes through it", sendername);
    // code for door
}
else if(PlayerInfo[playerid][pSex] == 2)
{
    format(string, sizeof(string), "%s opens the door as she passes through it", sendername);
    // code for door
}
Reply
#6

Assuming he has 'sex' defined as 'he' or 'she', and not as '0, 1, M or F' ..
pawn Код:
format(string, sizeof(string), "%s opens the door as %s passes through it", sendername, PlayerInfo[playerid][pSex]);
But it's not very possible lol
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)