SA-MP Forums Archive
[questions] Commands - 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: [questions] Commands (/showthread.php?tid=97152)



[questions] Commands - tony_fitto - 12.09.2009

Hey i have some few question.

1. Is it possible to make a command like drink a beer i allready have but shows a bottle/beer bottle in the hand of the player.
2. How can i do like i have a name Jacob_Ciedro and when he talk inside game it shows Jacob Ciedro, i allready have it but not without the _ now it does only say Jacob_Ciedro.

Help please. thanks all peaple for helping me.


Re: [questions] Commands - x-cutter - 13.09.2009

Quote:
Originally Posted by tony_fitto
Hey i have some few question.

1. Is it possible to make a command like drink a beer i allready have but shows a bottle/beer bottle in the hand of the player.
2. How can i do like i have a name Jacob_Ciedro and when he talk inside game it shows Jacob Ciedro, i allready have it but not without the _ now it does only say Jacob_Ciedro.

Help please. thanks all peaple for helping me.
1. Yes but only in 0.3
2. I don't quite remember you should ask someone else


Re: [questions] Commands - tony_fitto - 13.09.2009

Quote:
Originally Posted by X Cutter
Quote:
Originally Posted by tony_fitto
Hey i have some few question.

1. Is it possible to make a command like drink a beer i allready have but shows a bottle/beer bottle in the hand of the player.
2. How can i do like i have a name Jacob_Ciedro and when he talk inside game it shows Jacob Ciedro, i allready have it but not without the _ now it does only say Jacob_Ciedro.

Help please. thanks all peaple for helping me.
1. Yes but only in 0.3
2. I don't quite remember you should ask someone else
Thx for the update


Re: [questions] Commands - Calgon - 13.09.2009

Created by Norn (from Carlitos Roleplay):
pawn Код:
stock GetPlayerNameEx(playerid)
{
  new string[24];
  GetPlayerName(playerid,string,24);
  new str[24];
  strmid(str,string,0,strlen(string),24);
  for(new i = 0; i < MAX_PLAYER_NAME; i++)
  {
    if (str[i] == '_') str[i] = ' ';
  }
  return str;
}



Re: [questions] Commands - tony_fitto - 14.09.2009

Quote:
Originally Posted by Calgon
Created by Norn (from Carlitos Roleplay):
pawn Код:
stock GetPlayerNameEx(playerid)
{
  new string[24];
  GetPlayerName(playerid,string,24);
  new str[24];
  strmid(str,string,0,strlen(string),24);
  for(new i = 0; i < MAX_PLAYER_NAME; i++)
  {
    if (str[i] == '_') str[i] = ' ';
  }
  return str;
}
Thanks alot, only one thing left where should i put it under ? XD i where trying to find anything but i can't XD


Re: [questions] Commands - Correlli - 14.09.2009

pawn Код:
public OnPlayerText(playerid, text[])
{
  new string[128];
  format(string, sizeof(string), "%s: %s", GetPlayerNameEx(playerid), text);
  SendClientMessageToAll(0xFFFFFFAA, string);
  return 1;
}



Re: [help] onplayertext, Player name - tony_fitto - 14.09.2009

Quote:
Originally Posted by Don Correlli
pawn Код:
stock GetPlayerNameEx(playerid)
{
  new string[24];
  GetPlayerName(playerid,string,24);
  new str[24];
  strmid(str,string,0,strlen(string),24);
  for(new i = 0; i < MAX_PLAYER_NAME; i++)
  {
    if (str[i] == &#39;_') str[i] = ' ';
  }
  return str;
}
Yeah well i have tryed to put it there but i have so much things there, and i get error when i passed it there.
you can see all my onplayertext here.


Re: [questions] Commands - tony_fitto - 14.09.2009

Quote:
Originally Posted by Don Correlli
pawn Код:
stock GetPlayerNameEx(playerid)
{
  new string[24];
  GetPlayerName(playerid,string,24);
  new str[24];
  strmid(str,string,0,strlen(string),24);
  for(new i = 0; i < MAX_PLAYER_NAME; i++)
  {
    if (str[i] == '_') str[i] = ' ';
  }
  return str;
}
Yeah well this aint going anywhere, Im stuck now last time i puted it under public onplayertext i got error and then i tryed an othere thing then i get no error but i crashed when i connected to the server. Some one help me please. get this to work with me and i will pay you $1-5 depends on how fast i get help. Paypal only! HELP!


Re: [questions] Commands - tony_fitto - 16.09.2009

Now i have tryed everything but i cant get this to work. Help please


Re: [questions] Commands - tony_fitto - 16.09.2009

Quote:
Originally Posted by Don Correlli
pawn Код:
public OnPlayerText(playerid, text[])
{
  new string[128];
  format(string, sizeof(string), "%s: %s", GetPlayerNameEx(playerid), text);
  SendClientMessageToAll(0xFFFFFFAA, string);
  return 1;
}
OMG thanks now i see why this aint working xD