|
Member
|
06-09-2019
, 10:40
Re: plugin stop random
|
#5
|
dont know
can you do this for this?
Quote:
public Action UseRef(int client, int args) {
char arg1[64], steamid[64], nume[64], query[200];
if (args < 1) {
ReplyToCommand(client, "Foloseste sm_use_refferal <cod>");
return Plugin_Handled;
}
GetCmdArg(1, arg1, sizeof(arg1));
Format(query, sizeof(query), "SELECT code FROM RefCod WHERE code = '%s'", arg1);
DBResultSet hQuery = SQL_TQuery(DB,UseReffCallpublic, query);
if (hQuery != INVALID_HANDLE) {
if (SQL_FetchRow(hQuery)) {
char cod[64];
GetClientName(client, nume, sizeof(nume));
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
SQL_FetchString(hQuery, 0, cod, sizeof(cod));
CodFolosit(client, nume, steamid, cod);
}
else {
CGOPrintToChat(client, "{GREEN}Codul {RED}%s {GREEN}nu exista.", arg1);
LogError("Jucatorul %s a incercat codul %s -> Nu exsita", nume, arg1);
}
}
else
ReplyToCommand(client, "EROARE_USE");
return Plugin_Handled;
}
|
|
|
|
|