11.09.2011, 13:20
Hello,
Currently I'm using numbers in MySQL. Example of a command:
But now I wanna save words / names. Something like this:
How can I get something like that working. So in the database it's like:
Word = Hello
__
Hope you will understand this since I had struggs with writing this.
Currently I'm using numbers in MySQL. Example of a command:
pawn Код:
CMD:makeadmin(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
new id, lvl;
GetPlayerRame(id, str, 24);
if(sscanf(params, "ui", id, lvl)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName] [Level]");
else
{
PlayerInfo[id][Adminlevel] = lvl;
}
return 1;
}
// This will save the Adminlevel that I drop into the command (f ex. /makeadmin 0 1)
pawn Код:
CMD:setword(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
new id, word;
GetPlayerRame(id, str, 24);
if(sscanf(params, "ui", id, word)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName] [Word]");
else
{
PlayerInfo[id][Word] = word;
}
return 1;
}
Word = Hello
__
Hope you will understand this since I had struggs with writing this.