How i make .... - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How i make .... (
/showthread.php?tid=201897)
How i make .... -
Rock18 - 22.12.2010
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....
Re: How i make .... -
[MWR]Blood - 22.12.2010
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;
}
Re: How i make .... -
Rock18 - 22.12.2010
Thx man , let's see if it work....
Edit : Won't work , it says
Код:
error 017: undefined symbol "GetPName"
Re: How i make .... -
Sub Zero - 22.12.2010
did you tried to put GetPlayerName instead of GetPName
Re: How i make .... -
Rock18 - 22.12.2010
Yeah...no erros but it wont work....
Re: How i make .... -
Raimis_R - 22.12.2010
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
Re: How i make .... -
Cameltoe - 22.12.2010
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.
Re: How i make .... -
Rock18 - 22.12.2010
Yea ... it works ... no errors but when i type in game /credits ....
It doesn't show the name ...
Re: How i make .... -
Raimis_R - 22.12.2010
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
Re: How i make .... -
Rock18 - 22.12.2010
Код:
(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");