help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help (
/showthread.php?tid=483343)
help -
TiXz0r - 25.12.2013
Код:
[14:42:42] sscanf warning: 'z' is deprecated, consider using 'S' instead.
Код:
CMD:a(playerid, params[])
{
new sendername[MAX_PLAYER_NAME], string[160];
if(!(PlayerInfo[playerid][pAdmin] >= 1)) return SCM(playerid, COLOR_RED, "GRESKA: "COL_WHITE"Nemas prava za koristenje ove komande.");
if(isnull(params)) return SCM(playerid, COLOR_CYAN,"KORISTI: "COL_WHITE"/a [text]");
GetPlayerName(playerid,sendername,sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
format(string,160,"*AC* Admin %s: %s",sendername,params);
SendAdminMessage(COLOR_GOLD, string);
return 1;
}
Re: help -
SilentSoul - 25.12.2013
You didn't use sscanf in that command , you check the insull params , by the way there's no Specifier called 'z' here's list of specifiers
Specifier(s) | Name | Example values |
b | Binary | 01001, 0b1100 |
c | Character | a, o, * |
f | Float | 0.7, -99.5 |
g | IEEE Float | 0.7, -99.5, INFINITY, -INFINITY, NAN, NAN_E |
h, x | Hex | 1A, 0x23 |
i, d | Integer | 1, 42, -10 |
l | Logical | true, false |
n | Number | 42, 0b010, 0xAC, 045 |
o | Octal | 045 12 |
q | Bot name/id | ShopBot, 27 |
r | Player name/id | ******, 42 |
u | User name/id (bots and players) | ******, 0 |
Re: help -
TiXz0r - 25.12.2013
do you can fix this cmd? i will fix on others CMDs
Re: help -
J4mmyHD - 25.12.2013
pawn Код:
CMD:a(playerid, params[])
{
new sendername[MAX_PLAYER_NAME], string[160];
if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_RED, "GRESKA: "COL_WHITE"Nemas prava za koristenje ove komande.");
if(isnull(params)) return SCM(playerid, COLOR_CYAN,"KORISTI: "COL_WHITE"/a [text]");
GetPlayerName(playerid,sendername,sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
format(string,160,"*AC* Admin %s: %s", sendername, params);
SendAdminMessage(COLOR_GOLD, string);
return 1;
}
There you go.