SA-MP Forums Archive
/my command - 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: /my command (/showthread.php?tid=596242)



/my command - IzadorO - 14.12.2015

Any idea how to script a /my command where, if a player's name ends with the letter 's', there would just be a single apostrophe at the end, instead of (i.g): Izador_Os's, it would be: Izador_Os'.


Re: /my command - NourNN - 14.12.2015

what you mean


Re: /my command - IzadorO - 14.12.2015

Like, if you use /my and your surname ends with an 's', instead of "s's" being output, "s'" should be output.


Re: /my command - NourNN - 14.12.2015

i dont understunt


Re: /my command - dieuhanhphuc - 14.12.2015

i think he just want to delete the char behind " ' "...am i right?


Re: /my command - Assassin007 - 14.12.2015

Код:
#define Player Stats
YCMD:my(playerid,params[])
{
 new string2[200];
 new name[MAX_PLAYER_NAME];
 GetPlayerName(playerid, name, sizeof(name));
 format(string2,sizeof(string2),"Name: %ss'",name);
 ShowPlayerDialog(playerid,Stats,DIALOG_STYLE_MSGBOX,"Player Stats",string2,"Close","");
 return 1;
}
Something like this ?


Re: /my command - TwinkiDaBoss - 14.12.2015

No he wants of S to be display if the player name doesnt finish with S on the end.
Look at this, it might help you
https://sampwiki.blast.hk/wiki/Strfind


Re: /my command - PrO.GameR - 14.12.2015

I would give you 3 easy steps
A) GetPlayerName(playerid,pname);
B) lastvar=strlen(pname)-1;
C) if(pname[lastchar]=='s') then format without s, else format with s

Couldn't explain it better, hope you get it.