19.05.2012, 12:12
This is really annoying me now.
The string length is fine, it's just constantly cutting off.
Say if I said "Hello there my name is dasdhdashasd", it would say "Hello there my name i"
The string length is fine, it's just constantly cutting off.
Say if I said "Hello there my name is dasdhdashasd", it would say "Hello there my name i"
pawn Код:
command(vip, playerid, params[])
{
new message[500], string[500];
if(sscanf(params, "s", message))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /(v)ip [message]");
}
else
{
if(Player[playerid][VipRank] >= 1)
{
if(strlen(message) < 1)
{
SendClientMessage(playerid, WHITE, "SYNTAX: /(v)ip [message]");
}
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnectedEx(i) && Player[i][VipRank] >= 1 && Player[i][ToggedVIP] == 0)
{
switch(Player[playerid][VipRank]) {
case 1: {
format(string, sizeof(string), "[V] Bronze VIP %s: %s", GetName(playerid), message);
SendClientMessage(i, VIP_BRONZE, string);
}
case 2: {
format(string, sizeof(string), "[V] Silver VIP %s: %s", GetName(playerid), message);
SendClientMessage(i, VIP_SILVER, string);
}
case 3: {
format(string, sizeof(string), "[V] Gold VIP %s: %s", GetName(playerid), message);
SendClientMessage(i, VIP_GOLD, string);
}
case 4: {
format(string, sizeof(string), "[V] Admin %s: %s", GetName(playerid), message);
SendClientMessage(i, VIP_ADMIN, string);
}
}
}
}
}
}
}
return 1;
}