- 0
Ajutor ZCMD
-
Similar Content
-
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
BorneoJr
Salut, am incercat sa invat sa fac o comanda cu zcmd si sscanf dintr-o comanda strcmp, dar mereu am primit niste erori si alte chestii. Ma puteti ajuta cu un model ?
Sa imi faceti de exemplu asta (strcmp) in zcmd si sscanf, va rog, sa pot invata si eu asta.
if(strcmp(cmd, "/setvw", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, -1, "USAGE: /setvw [PlayerID/PartOfName] [VirtualWorldID]"); new playa; playa = ReturnUser(tmp); new virid; tmp = strtok(cmdtext, idx); virid = strval(tmp); if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { if(IsPlayerNPC(playa)) { return 1; } GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerVirtualWorld(playa, virid); format(string, sizeof(string), "* %s set's your VirtualWorld to %d.", sendername, virid); SendClientMessage(playa, COLOR_LIGHTRED, string); format(string, sizeof(string), "AdmCmd: %s set's %s's VirtualWorld to %d !", sendername, giveplayer, virid); ABroadCast(COLOR_LIGHTRED,string,1); } } } return 1; }4 answers to this question
Recommended Posts