/my command
#1

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'.
Reply
#2

what you mean
Reply
#3

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

i dont understunt
Reply
#5

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

Код:
#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 ?
Reply
#7

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
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)