09.10.2009, 13:38
hey guys i really have a big problem.
i have took some script parts from the GF gm to script me a command in which i type /stadium and then a space and then the stadium id.
but it always takes the first id even when i write /stadium 5 or so.
pls help.
i have took some script parts from the GF gm to script me a command in which i type /stadium and then a space and then the stadium id.
but it always takes the first id even when i write /stadium 5 or so.
pls help.
Код:
if (strcmp(cmd, "/stadium", true) == 0) { if(IsPlayerConnected(playerid)) { new staid[16]; strmid(staid, tmp, 0, strlen(cmdtext), 255); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { format(string, sizeof(string), "USAGE: /buygun [gunname] [ammoamount]"); return 1; } if (strcmp(staid, "1", true, strlen(staid)) == 0) { SetPlayerPos(playerid, -1394.20, 987.62, 1023.96); SetPlayerInterior(playerid, 15); ResetPlayerWeapons(playerid); } else if (strcmp(staid, "2", true, strlen(staid)) == 0) { SetPlayerPos(playerid, -1424.9319, -664.5869, 1059.8585); SetPlayerInterior(playerid, 4); ResetPlayerWeapons(playerid); } else if (strcmp(staid, "3", true, strlen(staid)) == 0) { SetPlayerPos(playerid, -1395.958, -208.197, 1051.170); SetPlayerInterior(playerid, 7); ResetPlayerWeapons(playerid); } else if (strcmp(staid, "4", true, strlen(staid)) == 0) { SetPlayerPos(playerid, -1079.99, 1061.58, 1343.04); SetPlayerInterior(playerid, 10); ResetPlayerWeapons(playerid); } else { SendClientMessage(playerid, COLOR_RED, " Invalid staidum id ! "); return 1; } } return 1; }