Quote:
Originally Posted by Jefff
pawn Code:
CMD:glasses(playerid, params[]) { if(isnull(cmdtext) || !(0 < strval(cmdtext) < 31)) SendClientMessage(playerid, 0xFFFFFFAA, "(Error) Syntax: /glasses [1 - 30]"); else{ new skin = GetPlayerSkin(playerid); new glasseid = CommonRed + (strval(cmdtext) - 1); SetPlayerHoldingObject(playerid, glasseid, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5]); TextDrawShowForPlayer(playerid, MsgBox); SetTimerEx("Hide", 3500, false, "d", playerid); } return 1; }
|
cmdtext is meant to be params btw.