Whats wrong? - 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: Whats wrong? (
/showthread.php?tid=135636)
Whats wrong? -
_soad_ - 21.03.2010
Hey, idk why but i've made only shit with my codes.
When I wants to Teleport so someone, it shows me
You has been teleportet to [Name].
But it does not shows the Name.
The same i have in my Money Transfer.
pawn Код:
// first I've made a new.
new c_var[MAX_PLAYERS];
//then i added it to OnPlayerClick..
public OnPlayerClickPlayer(playerid, clickedplayerid, source){
c_var[playerid] = clickedplayerid;
/*
Now there is a simple command for example.
I open a Input Dialog succesfully.
*/
if(dialogid == PN)
{
if(response == 1)
{
new aname[MAX_PLAYER_NAME],string[256];
GetPlayerName(playerid, aname, sizeof(aname));
format(string, sizeof(string), "PM from %s: %s", aname, inputtext);
SendClientMessage( c_var[playerid],0x0ffffff, string);
new name[MAX_PLAYER_NAME];
GetPlayerName(c_var[playerid], name, sizeof(name));
format(string, sizeof(string), "You send to %s this message:\n %s", c_var[playerid], inputtext);
ShowPlayerDialog(playerid, 444, DIALOG_STYLE_MSGBOX, "Message:",string, "Ok", "Close" );
}
}
Are the c_var wrong ? what?
Pls help
there are you can see the rest of codes, where i have problems
http://pastebin.com/h58rJ0dS
Re: Whats wrong? -
_soad_ - 21.03.2010
no one can help?
Re: Whats wrong? -
pen_theGun - 21.03.2010
GetPlayerName(playerid,
name, sizeof(name));
format(string, 128, "Du hast dich erfolgreich zu
%s geportet!",
c_var[playerid]);
Re: Whats wrong? -
_soad_ - 21.03.2010
could someone tell me, how to get the Name of clicked player?
And how use it?
Re: Whats wrong? -
Jeffry - 21.03.2010
pawn Код:
GetPlayerName(c_var[playerid], name, sizeof(name));
format(string, 128, "Du hast dich erfolgreich zu %s teleportiert!",name);
Maybe this?
Re: Whats wrong? -
_soad_ - 21.03.2010
i has lookes in a other script and found my error.
I forget to give the clicked player a Name
Now it should work: >