24.10.2014, 22:54
hello ,
i wanna make something is that if player goes binco and types for example the command /buyclothes (id )
it works but i want to disactive some skins id from there so that player if he types a SKIN id already on the array for example 70 , he will tell hem restricted skin .. so i've created an array but this last wont work( wont get compiled )
have alook on that code and tell me why isnt working
i wanna make something is that if player goes binco and types for example the command /buyclothes (id )
it works but i want to disactive some skins id from there so that player if he types a SKIN id already on the array for example 70 , he will tell hem restricted skin .. so i've created an array but this last wont work( wont get compiled )
have alook on that code and tell me why isnt working
PHP код:
C:\Users\ZOFTer\Desktop\0.3Z server\gamemodes\UG-RP.pwn(24975) : error 048: array dimensions do not match
C:\Users\ZOFTer\Desktop\0.3Z server\gamemodes\UG-RP.pwn(24975) : error 001: expected token: ",", but found "sizeof"
C:\Users\ZOFTer\Desktop\0.3Z server\gamemodes\UG-RP.pwn(24975) : warning 215: expression has no effect
C:\Users\ZOFTer\Desktop\0.3Z server\gamemodes\UG-RP.pwn(24975) : error 001: expected token: ";", but found ")"
C:\Users\ZOFTer\Desktop\0.3Z server\gamemodes\UG-RP.pwn(24975) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
PHP код:
if you guys want the command i'll pass it
PHP код:
if(dialogid == SKINMENU)
{
if(response)
{
new price = BizzInfo[PlayerInfo[playerid][InBusiness]][bProductPrice1];
new Coolarray[][] = {
"70",
"71",
"274"
};
if(!(in_array(Coolarray, strval(inputtext), size = sizeof Coolarray))) { //****24975****
if(strval(inputtext) < 0 || strval(inputtext) > 299) { SendClientMessage(playerid, COLOR_GREY, " Skin can't be below 0 or above 299!"); return 1; }
if(IsInvalidSkin(strval(inputtext))) { SendClientMessage(playerid, COLOR_GREY, " Invalid skin!"); return 1; }
if(PlayerInfo[playerid][pCash] >= price)
{
SetPlayerSkin(playerid, strval(inputtext));
PlayerInfo[playerid][pModel] = strval(inputtext);
format(string, sizeof(string), "You're new clothes have been purchased for $%d.", price);
SendClientMessage(playerid, COLOR_YELLOW, string);
PlayerInfo[playerid][pCash] -= price;
GivePlayerMoney(playerid, -price);
BizzInfo[PlayerInfo[playerid][InBusiness]][bTill] += price;
SaveBusiness(PlayerInfo[playerid][InBusiness]);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You don't have enough money!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Restricted skin!");
return 1;
}
}
}