- 0
Errori...
-
Similar Content
-
- 1 reply
- 2.000 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
zdupx
Salut.
Am adaugat in GM comanda /veh
if(strcmp(cmdtext, "/veh", true) == 0) { new tmp[256], idx, Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { return SendClientMessage(playerid, 0xFFFFFFFF, "Sintaxa: /veh <id>"); } new idcar = strval(tmp); if(idcar >= 400 && idcar <= 611) {} else return SendClientMessage(playerid, 0xFFFFFFFF, "Masinile sunt intre 400-611!"); new created = CreateVehicle(idcar, X, Y, Z, 90.0, 0, 0, 0); PutPlayerInVehicle(playerid, created, 0); SendClientMessage(playerid, 0xFFFFFFFF, "Succes!"); return 1; }si de unde am luat CMD zice sa pun la sfarsit si strtok astastrtok(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; }Si la complie imi da errorile astea<a href="http://www.game-state.eu/94.60.40.50:7777/"><img src="http://www.game-state.eu/94.60.40.50:7777/n-560x95_FFFFFF_FFFFFF_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>
1 answer to this question
Recommended Posts