SA-MP Forums Archive
/m(icrophone) with ranks - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /m(icrophone) with ranks (/showthread.php?tid=466924)



/m(icrophone) with ranks - ajam112 - 30.09.2013

Microphone
pawn Код:
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
        {
            format(string, sizeof(string), "[SFPD %s:o< %s]", GetPlayerNameEx(playerid), params);
            ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
        }
for rank function is

pawn Код:
pRank,
Rank
I want example

Код:
SFPD Lieutenant George Maxwell:o< test



Re: /m(icrophone) with ranks - RedWolfX - 30.09.2013

pawn Код:
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
        {
           
new rank = PlayerInfo[playerid][pRank]
format(string, sizeof(string), "[SFPD %s %s:o< %s]",rank, GetPlayerNameEx(playerid), params);
            ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
        }

Should be working, untested though


Re: /m(icrophone) with ranks - Georgi166 - 30.09.2013

Its not a microphone, its a megaphone, jesus.


Re: /m(icrophone) with ranks - RedWolfX - 30.09.2013

Quote:
Originally Posted by Georgi166
Посмотреть сообщение
Its not a microphone, its a megaphone, jesus.
You posted just to say that? He is asking for scripting help and not grammar help.

OT: Did it work?


Re: /m(icrophone) with ranks - ajam112 - 30.09.2013

i'm dont try yet.. but i will try in minutes...


Re: /m(icrophone) with ranks - ajam112 - 30.09.2013

error

Код:
C:\Users\GW\Desktop\New files\GtA SA\RGRP by Ghazi\gamemodes\pgrp6.pwn(57277) : error 001: expected token: ";", but found "-identifier-"
pawn Код:
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
        {
        new rank = PlayerInfo[playerid][pRank]
            format(string, sizeof(string), "[SFPD %s %s:o< %s]",rank, GetPlayerNameEx(playerid), params); //linerror
            ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
        }



Re: /m(icrophone) with ranks - iZN - 30.09.2013

Change
pawn Код:
new rank = PlayerInfo[playerid][pRank]
to this:
pawn Код:
new rank = PlayerInfo[playerid][pRank];



Re: /m(icrophone) with ranks - ajam112 - 30.09.2013

Thanks iZN and RedWolfX it's work


Re: /m(icrophone) with ranks - ajam112 - 30.09.2013

guy when i try in-game it's doesnt show the rank name
it's only like below

Код:
SFPD [space] My_Name:o< text



Re: /m(icrophone) with ranks - RedWolfX - 30.09.2013

Right, I forgot about that. Do you have a GetPlayerRank code?

If you do, replace rank with GetPlayerRank(playerid)

pawn Код:
format(string, sizeof(string), "[SFPD %s %s:o< %s]",GetPlayerRank(playerid), GetPlayerNameEx(playerid), params); //linerror