26.06.2012, 16:07
HERE:
pawn Код:
if(!strcmp("/buyochelari",cmd,true))
{
if(PlayerToPoint(3.0,playerid,1030.5072,-977.4466,42.9841))
{
tmp = strtok(cmdtext, idx);
skin = GetPlayerSkin(playerid);
id = strval(tmp);
if(!id || id > 33) return SendClientMessage(playerid, 0xFFFFFFAA, "{FFFFFF}/buyochelari [1-33]");
GivePlayerCash(playerid, -100);
//glasseid(playerid) = "the current chosen glass id");
if(id > 30) goto PutPoliceGlasses;
else
{
id--;
glasseid = CommonRed + id;
SetPlayerHoldingObject(playerid, glasseid, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5]);
return 1;
}
PutPoliceGlasses:
glasseid = CopGlassesBlack + (id - 31);
SetPlayerHoldingObject(playerid, glasseid, 2, SkinOffSet[skin][0], floatadd(SkinOffSet[skin][1], 0.004500), SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5]);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, " Nu esti la Magazinul de Haine/Ochelari/Sapci! ");
}
return true;
}
PHP код:
Oncommandtext: new glasseid, skin, id;