15.08.2016, 10:44
PHP код:
stock GetFactionTypeName(type)
{
new typestr[20];
switch(type)
{
case FACTION_TYPE_NONE: typestr = "None";
case FACTION_TYPE_POLICE: typestr = "Police";
case FACTION_TYPE_MEDIC: typestr = "Fire & Medic";
case FACTION_TYPE_GOV: typestr = "Government";
case FACTION_TYPE_NEWS: typestr = "News";
case FACTION_TYPE_WEAPONS: typestr = "Weapon dist.";
case FACTION_TYPE_DRUGS: typestr = "Drug dist.";
default: typestr = "undefined";
}
return typestr;
}
PHP код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '#') // The first character of the text is #
else if(text[6] == 'A') // The 7th character of the text is a capital A