Help :/
#1

Alright, I made a /duty for the PD and it is saying "Unknown Error"
pawn Код:
dcmd_duty(playerid, params[])
{
    GetPlayerWeapon(playerid, 348, 353, 334, 356);
    SetPlayerAmmo(playerid, 100);
    return 1;
}
Also, I have a /o command, I want to know how, Some one would say something E.g Luis_Geramia: Hello, As you see the name is blue, i need away to make it so when a player gets a PD skin he/she's name turns blue in the OOC chat..
Reply
#2

Well you seem to be using GetPlayerWeapon completely wrong.

https://sampwiki.blast.hk/wiki/GetPlayerWeapon

Are you sure it's not

https://sampwiki.blast.hk/wiki/GetPlayerWeaponData
Reply
#3

For the colour blue. Use this under wherever your command is to change them to onduty or change skins.

https://sampwiki.blast.hk/wiki/SetPlayerColor
Reply
#4

Quote:
Originally Posted by Kayla.S
Посмотреть сообщение
For the colour blue. Use this under wherever your command is to change them to onduty or change skins.

https://sampwiki.blast.hk/wiki/SetPlayerColor
My OOC Chat is still white, I need it to be Blue .
Reply
#5

Could you post the code then please? All you're wanting is just the players name blue when their a cop, but nobody else's? His chat messages you want still white though correct?
Reply
#6

Quote:
Originally Posted by Kayla.S
Посмотреть сообщение
Could you post the code then please? All you're wanting is just the players name blue who is a cop nobody elses and not his chat messages correct?
Yes, Example, Say i am a cop and i have chosen a cop skin in the Selection screen my name would be Luis_Geramia: Hello, Like that,
The code is,

pawn Код:
dcmd_o(playerid, params[])
{
    if(!strlen(params)) return
    SendClientMessage(playerid, COLOR_YELLOW, "Usage: /o [chat]");
    new str[256], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(str, sizeof(str), "%s: %s", pName, params);
    SendClientMessageToAll(COLOR_WHITE, str);
    return 1;
}
Reply
#7

I'm sorry I'm too familiar with dcmd. I use strcmp. I would think this would work though.

pawn Код:
dcmd_o(playerid, params[])
{
    if(!strlen(params)) return
    SendClientMessage(playerid, COLOR_YELLOW, "Usage: /o [chat]");
    new str[256], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(str, sizeof(str), "%s: %s", pName, params);
    SendClientMessageToAll(COLOR_WHITE, str);
    SetPlayerColor(playerid, COLOR_BLUE);
    return 1;
}
Reply
#8

If you want the OOC to be blue shouldn't it be this instead of COLOR_WHITE...

pawn Код:
SendClientMessageToAll(COLOR_BLUE, str);
Reply
#9

Well when they join the PD, however it happens in your script just do

pawn Код:
SetPlayerColor(playerid,COLOR_BLUE);
Reply
#10

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
Well when they join the PD, however it happens in your script just do

pawn Код:
SetPlayerColor(playerid,COLOR_BLUE);
Basically, he wants it to be like this:

That_Dude: Hi!

As far as I know it's not possible.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)