SA-MP Forums Archive
need help with this - 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: need help with this (/showthread.php?tid=383093)



need help with this - xMCx - 06.10.2012

how to make when someone is a vip
and he wants yo make an /ad
to give him three text color options
if he wants to make the /ad text blue red or green
ive made this so far:
PHP код:
CMD:vipad(playeridparams[])
{
    new 
dcolorstring[128], sendername[MAX_PLAYER_NAME];
    if(
PlayerInfo[playerid][pVip] < 2) return SendClientMessage(playerid,red,"your Not VIP");
    if(
isnull(params)) return SendClientMessage(playeridlb,"USAGE:/ad [advertisement]");
    
ShowPlayerDialog(playerid,DIALOG_VIPAD,DIALOG_STYLE_LIST,"Choose a color","Red \nGreen \nBlue","Choose","Cancel");
    
GetPlayerName(playeridsendernamesizeof(sendername));
    
format(stringsizeof(string), "[Advertisment]: %s, Contact %s ,Phone: %d",  paramssendername ,PlayerInfo[playerid][pNumber]);
    
SendClientMessageToAll(color,string);




Re: need help with this - arakuta - 06.10.2012

And whats the problem?

You forget a return true...


Re: need help with this - xMCx - 06.10.2012

its not really done yet , i mean i want before he send it , he can choose what color he wants it to be


Re: need help with this - xMCx - 06.10.2012

bump..


Re: need help with this - Faisal_khan - 06.10.2012

Work it out under
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])



Re: need help with this - Danyal - 06.10.2012

you are using ad as a text and color as a dialog convert your ad system into dialog system


Re: need help with this - xMCx - 06.10.2012

how to use it as a text color then :P?
PHP код:
CMD:vipad(playerid,params[])
{
    new 
color,string[128], sendername[MAX_PLAYER_NAME];
    if(
sscanf(params,"ss[128]",color,string)) return SendClientMessage(playeridlb,"USAGE:/ad [advertisement]");
    
GetPlayerName(playeridsendernamesizeof(sendername));
    
format(stringsizeof(string), "[Advertisment]: %s, Contact %s ,Phone: %d",  paramssendername ,PlayerInfo[playerid][pNumber]);
    
SendClientMessageToAll(color,string);
    return 
1;