03.02.2011, 15:01
Try it with that
pawn Код:
CMD:request(playerid, params[])
{
if(sscanf(params, "i", params[0])) return SendClientMessage(playerid, red, "USAGE:/request [org]");
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof string, "UPDATE ostats SET req=%d WHERE Name='%s'", params[0], name);
mysql_query(string);
format(string, sizeof string, "SELECT * FROM orgs WHERE ID=%d", params[0]);
mysql_query(string);
mysql_store_result();
mysql_fetch_row_format(string, "|");
mysql_free_result();
params[0] = (strfind(string, "|", false) + 1);
string[strfind(string, "|", false, params[0])] = EOS;
format(string, sizeof string, "~%s is requesting to join %s.", name, string[params[0]]);
SendClientMessageToAll(COLOR_ORANGE, string);
return 1;
}