23.03.2014, 01:15
Quote:
new string[256]; new cmd[128], idx; // new tmp[128]; // cmd = strtok(cmdtext, idx);// CMDetcar(playerid, params[]) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "teste"); new plid, modeloid,cor1,cor2; tmp = strtok(cmd, idx); if(!strlen(tmp)){ SendClientMessage(playerid, vermelho, "[Info-Insano]: /setcar [PlayerID] [ModeloID] [Cor1] [Cor2]"); return 1; } plid = strval(tmp); //================================================== ==================== tmp = strtok(cmd, idx); if(!strlen(tmp)) { SendClientMessage(playerid, vermelho, "[Info-Insano]: /setcar [PlayerID] [ModeloID] [Cor1] [Cor2]"); return 1; } modeloid = strval(tmp); //================================================== ==================== tmp = strtok(cmd, idx); if(!strlen(tmp)) { SendClientMessage(playerid, vermelho, "[Info-Insano]: /setcar [PlayerID] [ModeloID] [Cor1] [Cor2]"); return 1; } cor1 = strval(tmp); //================================================== ==================== tmp = strtok(cmd, idx); if(!strlen(tmp)) { SendClientMessage(playerid, vermelho, "[Info-Insano]: /setcar [PlayerID] [ModeloID] [Cor1] [Cor2]"); return 1; } cor2 = strval(tmp); //================================================== ==================== if(!IsPlayerConnected(plid)){ SendClientMessage(playerid, vermelho, "[Info-Insano]: Jogador nгo estб conectado!"); return 1; } if(modeloid >= 400 && modeloid <= 611){ if(CriarVeiculoPlayer(playerid,plid,modeloid,cor1, cor2)){ SendClientMessage(playerid, verde, "[Info-Insano]: Veiculo Criado e Salvo com sucesso!"); new msg[256]; format(msg,256,"[Info-RedBull]: O Administrador %s Criou Um Veiculo Exclusivo Para Vocк!",PlayerNome(playerid)); SendClientMessage(plid, verde, msg); }else{ SendClientMessage(playerid, verde, "[Info-Insano]: Erro ao criar o veiculo!"); } return 1; }else{ SendClientMessage(playerid, vermelho, "[Info-Insano]: Modelo ID Incorreto! (400-611)"); return 1; } } return 0; } |