new
String[256],
Texto[128];
CMD:radio(playerid, params[])
{
if(Player[playerid][qOrganizacao] == CIVIL) return SendClientMessage(playerid, COR_BRANCA, "Vocк nгo faz parte de nenhuma org!");
if(sscanf(params, "s", Texto)) return SendClientMessage(playerid, COR_BRANCA, "USE: /radio [MENSAGEM]");
if(Player[playerid][qOrganizacao] == 1)
{
if(Player[playerid][qCargo] == 6)
{
format(String, sizeof(String), "6єLнder %s: %s.", PlayerNick(playerid), Texto);
}
else if(Player[playerid][qCargo] == 5) { format(String, sizeof(String), "5єSub-Lнder %s: %s.", PlayerNick(playerid), Texto); }
else if(Player[playerid][qCargo] == 4) { format(String, sizeof(String), "4єGerente %s: %s.", PlayerNick(playerid), Texto); }
else if(Player[playerid][qCargo] == 3) { format(String, sizeof(String), "3єFogueteiro %s: %s.", PlayerNick(playerid), Texto); }
else if(Player[playerid][qCargo] == 2) { format(String, sizeof(String), "2єCampana %s: %s.", PlayerNick(playerid), Texto); }
else if(Player[playerid][qCargo] == 1) { format(String, sizeof(String), "1єAviгozinho %s: %s.", PlayerNick(playerid), Texto); }
SendFamilyMessage(Player[playerid][qOrganizacao], COR_GROOVE_STREET, String);
}
return 1;
}
if(sscanf(params, "s[100]", Texto)
vlw funciono, mais isso esse [100] vai contar como string tbm ?
|
CMD:radio(playerid, params[])
{
if(Player[playerid][qOrganizacao] == CIVIL)
return SendClientMessage(playerid, COR_BRANCA, "Vocк nгo faz parte de nenhuma org!");
if(sscanf(params, "s[128]", params[0]))
return SendClientMessage(playerid, COR_BRANCA, "USE: /radio [MENSAGEM]");
if(Player[playerid][qOrganizacao] == 1)
{
switch(Player[playerid][qCargo])
{
case 6: format(String, sizeof(String), "6єLнder %s: %s.", PlayerNick(playerid), params[0]);
case 5: format(String, sizeof(String), "5єSub-Lнder %s: %s.", PlayerNick(playerid), params[0]);
case 4: format(String, sizeof(String), "4єGerente %s: %s.", PlayerNick(playerid), params[0]);
case 3: format(String, sizeof(String), "3єFogueteiro %s: %s.", PlayerNick(playerid), params[0]);
case 2: format(String, sizeof(String), "2єCampana %s: %s.", PlayerNick(playerid), params[0]);
case 1: format(String, sizeof(String), "1єAviгozinho %s: %s.", PlayerNick(playerid), params[0]);
}
SendFamilyMessage(Player[playerid][qOrganizacao], COR_GROOVE_STREET, String);
}
return 1;
}