How i make ....
#1

Hello , pls can you tell me how to make in a credits dialog to show the name of the player who type that command
Ex :

It says : And Rock because is playing on the server ! Rock is the player that type the command , i hope you understand what i mean ....
I try with getplayername ....but didn't work....
Reply
#2

pawn Код:
new string[128];
format(string,sizeof(string),"And %s because is playing on our server!",GetPName(playerid));
ShowPlayerDialog(playerid,1111,0,"Credits",string,"OK","Cancel");
return 1;
}
Reply
#3

Thx man , let's see if it work....

Edit : Won't work , it says
Код:
 error 017: undefined symbol "GetPName"
Reply
#4

did you tried to put GetPlayerName instead of GetPName
Reply
#5

Yeah...no erros but it wont work....
Reply
#6

If don't working you need...

Quote:

new result[52],
name [MAX_PLAYER_NAME ];
format(result,sizeof(result),"And %s because is playing on our server!",name);
ShowPlayerDialog(playerid,1111,0,"Credits",string, "OK","Cancel");
return true;
}

This working
Reply
#7

Quote:
Originally Posted by Raimis_R
Посмотреть сообщение
If don't working you need...
pawn Код:
new result[52],
name [MAX_PLAYER_NAME ];
format(result,sizeof(result),"And %s because is playing on our server!",name);
ShowPlayerDialog(playerid,1111,0,"Credits",string, "OK","Cancel");
return true;
This working
Working? try that piece of code, i can tell you for sure it's not working at all.

pawn Код:
#define DIALOG_CREDITS

new name [ MAX_PLAYER_NAME ], string[ 128 ];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"And %s because is playing on our server!", name);
ShowPlayerDialog(playerid, DIALOG_CREDITS, 0, "Credits", string, "OK", "Cancel");
Would do the trick, good luck.
Reply
#8

Yea ... it works ... no errors but when i type in game /credits ....

It doesn't show the name ...
Reply
#9

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
Working? try that piece of code, i can tell you for sure it's not working at all.

pawn Код:
#define DIALOG_CREDITS

new name [ MAX_PLAYER_NAME ], string[ 128 ];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"And %s because is playing on our server!", name);
ShowPlayerDialog(playerid, DIALOG_CREDITS, 0, "Credits", string, "OK", "Cancel");
Would do the trick, good luck.
Omg i forget GetPlayerName(playerid, name, sizeof(name));
I'm stupid
Reply
#10

Код:
(523) : error 029: invalid expression, assumed zero
(523) : warning 215: expression has no effect
(523) : warning 215: expression has no effect
(523) : warning 215: expression has no effect
(523) : warning 215: expression has no effect
(523) : warning 215: expression has no effect
(523) : error 001: expected token: ";", but found ")"
(523) : error 029: invalid expression, assumed zero
(523) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Line 523
Код:
ShowPlayerDialog(playerid, DIALOG_CREDITS, 0, "Credits", string, "OK", "Cancel");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)