Little Question
#3

Thanks, I tryed it it shows only the first letter

dcmd_haircut(playerid,params[])
{
new tmp[256], idx;
tmp = strtok(params,idx);
new otherplayer = strvalEx(tmp);
if(PlayerData[playerid][barber] < 1) return SendClientMessage(playerid, RED, "SERVER MESSAGE: You are not a Barber!");
if(!strlen(tmp)) { SendClientMessage(playerid, WHITE, "Correct Usage: /haircut [Playerid] [Style]"); return true; }
if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, RED, "SERVER MESSAGE: Incorrect ID");
if(otherplayer == playerid) return SendClientMessage(playerid, RED, "You can't make a Haircut yourself!");
tmp = strrest(params,idx);
new pname[MAX_PLAYER_NAME];
new pname2[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(otherplayer, pname, sizeof(pname));
GetPlayerName(playerid, pname2, sizeof(pname2));
tmp = strrest(params, idx);
format(string, sizeof(string), "Barber %s has made you a %s Hairstyle", pname2,tmp);
SendClientMessage(otherplayer,RED, string);
strmid(PlayerData[playerid][barber], tmp, 0, strlen(tmp), 255);
return true;
}
Reply


Messages In This Thread
Little Question - by Erkan - 05.07.2010, 22:52
Re: Little Question - by Carlton - 05.07.2010, 22:53
Re: Little Question - by Erkan - 05.07.2010, 23:14
Re: Little Question - by Carlton - 05.07.2010, 23:20
Re: Little Question - by Erkan - 05.07.2010, 23:23
Re: Little Question - by Erkan - 05.07.2010, 23:45
Re: Little Question - by Erkan - 06.07.2010, 16:53

Forum Jump:


Users browsing this thread: 2 Guest(s)