Help with a code[REP+]
#4

pawn Код:
stock GetPlayerLastName(playerid)
{
   new name[24];
   GetPlayerName(playerid,name,24);

   new pos = strfind(name,"_");

   if(pos != -1)
   {
     strdel(name,0,pos+1);
   }
   return name;
}


CMD:lastname(playerid)
{
   new str[128];
   format(str,sizeof(str),"Your last name is %s",GetPlayerLastName(playerid));
   SendClientMessage(playerid,0xFFFFFFFF,str);
   return 1;
}

or

pawn Код:
stock GetLastName(fullname[])
{
   new str[24];
   new pos = strfind(fullname,"_");
   if(pos != -1)
   {
     strdel(fullname,0,pos+1);
   }
   format(str,sizeof(str),"%s",fullname);
   return str;
}
Reply


Messages In This Thread
Help with a code[REP+] - by Strech - 22.08.2012, 08:07
Re: Help with a code[REP+] - by Strech - 22.08.2012, 08:51
Re: Help with a code[REP+] - by CentyPoo - 22.08.2012, 09:07
Re: Help with a code[REP+] - by HuSs3n - 22.08.2012, 09:19

Forum Jump:


Users browsing this thread: 1 Guest(s)