13.12.2014, 18:22
(
Последний раз редактировалось AndreLuiz; 13.12.2014 в 18:58.
)
pawn Код:
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, "(ERRO) Digite: /cv [id-do-caro]");
return 1;
}
plid = strval(tmp);
if(plid==3 || plid==2 || plid==1 || plid==4 || plid==5 || plid==56 || plid==50 || plid==43 || plid==52 || plid==44|| plid==45 ){
SendClientMessage(playerid, Vermelho, "[SERVER] 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(playerid));
SetVehicleVirtualWorld(carro,GetPlayerVirtualWorld(playerid));
format(string, sizeof(string), "| INFO | Vocк criou o veнculo de id: %d", plid);
SendClientMessage(playerid, tcadm, string);
return 1;
}else{
SendClientMessage(playerid, Vermelho, "(ERRO) ID invбlido || ID's = 400-611");
return 1;
}
}
}
}