04.09.2011, 16:09
vocк quer um comando de criar carro ou de criar infernus? 'kkk' sou lerdo -n,
responde ai que eu jб crio aqui...
@EDIT criei um rapidinho, caso nгo seja isso que vocк queira sу me falar...
ai no caso vocк teria que digitar /criar 411 1 1
responde ai que eu jб crio aqui...
@EDIT criei um rapidinho, caso nгo seja isso que vocк queira sу me falar...
pawn Код:
if(strcmp(cmd,"/criar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return msg(playerid,-1,"Use: /cv [VeiculoID][Cor1][Cor2]");
new carro = strval(tmp); tmp = strtok(cmdtext,idx);
if(carro < 400 || carro > 611) return msg(playerid,RED,"IDS indisponiveis");
new cor1 = strval(tmp); tmp = strtok(cmdtext,idx);
if(cor1 < 1 || cor1 > 126) return msg(playerid,RED,"Cores indisponiveis.(1 - 126)");
new cor2 = strval(tmp); tmp = strtok(cmdtext,idx);
if(cor2 < 1 || cor2 > 126) return msg(playerid,RED,"Cores indisponivels.(1 - 126)");
new Float:X,Float:Y,Float:Z,Float:Angle;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
new Text3D:label;
new carro1 = CreateVehicle(carro,X,Y,Z,Angle,cor1,cor2,6000000);
format(string,sizeof(string),"Vocк criou o carro %d",carro1);
SendClientMessage(playerid,-1,string);
return 1;
}
}