Posts: 239
Threads: 33
Joined: Aug 2011
Reputation:
0
Hi, i have problem with this code :
new tmp[256];
tmp = strtok(cmdtext,idx);
if(strval(tmp) > 299 || strval(tmp) < 0) return SendClientMessage(playerid, -1,"That skin does not exists");
SetPlayerSkin(playerid,strval(tmp));
How can convert this to zcmd ?
suhrab_mujeeb
Unregistered
pawn Код:
// Top of the script under #include <a_samp>
#include <zcmd>
//Anywhere in the script
CMD:skin(playerid, params[])
{
new tmp[256];
tmp = strtok(cmdtext,idx);
if(strval(tmp) > 299 || strval(tmp) < 0) return SendClientMessage(playerid, -1,"That skin does not exists");
SetPlayerSkin(playerid,strval(tmp));
return 1;
}
I didn't check the code but just made it zcmd for ya.
Posts: 239
Threads: 33
Joined: Aug 2011
Reputation:
0
D:\Program Files (x86)\Rockstar Games\GTA San Andreas\filterscripts\BamAdmin.pwn(381) : error 017: undefined symbol "cmdtext"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
suhrab_mujeeb
Unregistered
Convert it to sscanf or go with the regular strcmp.
EDIT: Shit! Kostas is too quick.