25.04.2011, 00:29
Hello i have problem with params
if i type /drift 1 i get invalid command
if i type /drift i get Usage: /drift <drift place> (1-53)
if i type /drift 11 i goto drift 1
if i type /drift 12 i goto drift 2
PHP код:
CMD:drift(playerid, params[])
{
if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, -1, "Usage: /drift <drift place> (1-53)");
if(params[0] < 1 || params[0] > 53) return SendClientMessage(playerid, COLOR_YELLOW, "ERROR: Invalid Drift place. It can be only from 1 to 53!");
PlayerGoesDrift(playerid, DriftCoords[strval(params)-1][0], DriftCoords[strval(params)-1][1], DriftCoords[strval(params)-1][2], DriftCoords[strval(params)-1][3], DriftCoords[strval(params)-1][4]);
return 1;
}
if i type /drift i get Usage: /drift <drift place> (1-53)
if i type /drift 11 i goto drift 1
if i type /drift 12 i goto drift 2