19.03.2011, 21:11
bem criei um comando de respawn org, so que quando eu ponho /respawnorg 1, ele nao vai, fica falando /respawnorg [orgid] e nao vai. aki o comando
Код:
if(strcmp(cmd, "/respawnorg", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] >= 1) { if(admtrampando[playerid] < 1) { SendClientMessage(playerid, COLOR_GREY, " Vocк nao estб em modo adm!!"); return 1; } new x_nr[256]; new carid = strval(tmp); x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "USE: /respawnorg [ orgid ]"); SendClientMessage(playerid, COLOR_WHITE, "Id validos : /np."); return 1; } if(strcmp(x_nr,"1",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USE: /respawnorg [ orgid ]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(IsPlayerConnected(giveplayerid)) { if(IsAPmCar(carid) != INVALID_VEHICLE_ID) { SetVehicleToRespawn(IsAPmCar(carid)); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " ID invalido !"); return 1; } } if(strcmp(x_nr,"2",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USE: /respawnorg [ orgid ]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(IsPlayerConnected(giveplayerid)) { if(IsABOPECar(carid) != INVALID_VEHICLE_ID) { SetVehicleToRespawn(IsABOPECar(carid)); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " ID invalido !"); return 1; } } if(strcmp(x_nr,"3",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USE: /respawnorg [ orgid ]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(IsPlayerConnected(giveplayerid)) { if(IsAExCar(carid) != INVALID_VEHICLE_ID) { SetVehicleToRespawn(IsAExCar(carid)); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " ID invalido !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й ADM !"); return 1; } } return 1; }