string into array
#4

Quote:
Originally Posted by ghostbalkan
View Post
I fixed it on this way
Code:
CMD:vipboja(playerid, const params[])
{
	if(vip_Info[playerid][VIPBodovi] <= 0)
        return SendClientMessage(playerid, vip_Info[playerid][VIPBoja], "VIP | {FFFFFF}Nemate VIP bodova.");

    extract params -> new string:vipboja[11]; else
	{
        return SendClientMessage(playerid, vip_Info[playerid][VIPBoja], "VIP | {FFFFFF}/vipboja (boja - primjer 0x8b9940FF)");
    }

    strcpy(vip_Info[playerid][VIPBoja], vipboja, sizeof(vipboja));
    vip_Info[playerid][VIPBodovi] --;
    
	format(game_string, sizeof(game_string), "VIP | {FFFFFF}Postavili ste sebi VIP boju  na %s.", vipboja);
	SendClientMessage(playerid, vip_Info[playerid][VIPBoja], game_string);
	game_string[0] = EOS;
	format(game_string, sizeof(game_string), "VIP | {FFFFFF}Trenutni VIP bodovi %i", vip_Info[playerid][VIPBodovi]);
	SendClientMessage(playerid, vip_Info[playerid][VIPBoja], game_string);
	game_string[0] = EOS;
	return true;
}
Code:
strcpy(dest[], src[], size = sizeof(dest))
{
    dest[0] = EOS;
    return strcat(dest, src, size);
}
it is working now but color is always black?
I put VIP Color ein enumator and I SendClientMessage like this
Code:
	format(game_string, sizeof(game_string), "VIP | {FFFFFF}Postavili ste sebi VIP boju na %s.", vipboja);
	SendClientMessage(playerid, vip_Info[playerid][VIPBoja], game_string);


I am really confused rn haha
Aj brate pisi priv, objasnit cu ti.
Reply


Messages In This Thread
string into array - by ghostbalkan - 13.04.2019, 15:49
Re: string into array - by coool - 13.04.2019, 16:14
Re: string into array - by ghostbalkan - 13.04.2019, 20:31
Re: string into array - by TokicMajstor - 13.04.2019, 21:01
Re: string into array - by ghostbalkan - 13.04.2019, 21:48
Re: string into array - by SyS - 14.04.2019, 02:49
Re: string into array - by NaS - 14.04.2019, 10:44

Forum Jump:


Users browsing this thread: 1 Guest(s)