[Ajuda] Criar +1 de um veнculo no Servidor?
#2

Nгo uso CMD, mas pra vocк ter uma base.

Quote:

if(strcmp(cmd, "/cv", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
new plid;
//new carro;
new Float:X,Float:Y,Float:Z,Float:Angle;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "** Digite: /cv [id-do-caro]");
return 1;
}
plid = strval(tmp);
if(plid==611){
SendClientMessage(playerid, Vermelho, "** ID de carro Proibido!");
return 1;
}
if(IsPlayerConnected(playerid)){
if(plid >= 400 && plid <= 611){
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
new carro = CreateVehicle(plid, X, Y, Z, Angle, -1, -1, 120000);
PutPlayerInVehicle(playerid,carro,0);
if(GetPlayerInterior(playerid))
LinkVehicleToInterior(carro,GetPlayerInterior(play erid));
SetVehicleVirtualWorld(carro,GetPlayerVirtualWorld (playerid));
format(string, sizeof(string), "* Voc? criou o ve?culo de id: %d", plid);
SendClientMessage(playerid, AdminCor, string);
return 1;
}else{
SendClientMessage(playerid, Vermelho, "** ID inv?lido || ID's = 400-611");
return 1;
}
}
}
}

E

Quote:

if(strcmp(cmd, "/pintar", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(DOF2_GetInt(file, "Profissao") == Mecanico || DOF2_GetInt(file, "VIP") == 1 || DOF2_GetInt(file, "aAdmin") == 1 || IsPlayerAdmin(playerid) == 1){
new tmp[256];
new cor1,cor2;
new veiculo;
tmp = strtok(cmdtext,idx);
cor1 = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "/pintar [cor1] [cor2]");
return 1;
}

Reply


Messages In This Thread
Criar +1 de um veнculo no Servidor? - by Kyl3 - 05.02.2013, 12:44
Re: Criar +1 de um veнculo no Servidor? - by WotusPower - 05.02.2013, 12:46

Forum Jump:


Users browsing this thread: 2 Guest(s)