dcmd to zcmd convert
#1

How can i convert example this to zcmd + sscanf2

example:

Quote:

dcmd_setlaps(playerid,params[])
{
new tmp[256], idx;
tmp = strtok(params, idx);
if(!strlen(tmp) || strval(tmp) <= 0)
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setlaps [amount of laps (min: 1)]");
return 1;
}
if(RaceBuilders[playerid] != 0)
{
Blaps[b(playerid)] = strval(tmp);
format(tmp,sizeof(tmp),"Amount of laps set to %d.", Blaps[b(playerid)]);
SendClientMessage(playerid, COLOR_GREEN, tmp);
return 1;
}
if(RaceAdmin == 1 && IsNotAdmin(playerid)) return 1;
if(RaceActive == 1 || RaceStart == 1) SendClientMessage(playerid, COLOR_RED, "Race already in progress!");
else if(LCurrentCheckpoint == 0) SendClientMessage(playerid, COLOR_YELLOW, "No race loaded.");
else
{
Racelaps=strval(tmp);
format(tmp,sizeof(tmp),"Amount of laps set to %d for current race.", Racelaps);
SendClientMessage(playerid, COLOR_GREEN, tmp);
}
return 1;
}

Reply


Messages In This Thread
dcmd to zcmd convert - by Jimbo01 - 11.12.2011, 18:00
Re: dcmd to zcmd convert - by PlayHard - 11.12.2011, 18:02
Re: dcmd to zcmd convert - by grand.Theft.Otto - 11.12.2011, 18:05
Re: dcmd to zcmd convert - by PlayHard - 11.12.2011, 18:11
AW: dcmd to zcmd convert - by Jimbo01 - 11.12.2011, 18:27

Forum Jump:


Users browsing this thread: 3 Guest(s)