29.06.2016, 14:41
Hi, when i put this ProxDetector to the command, it wont show the "rp" text and it says Unknown Command
but the command is still working.. If i remove the proxtedector the command works, and it doesnt say unknown command. what is wrong?
This is the proxdetector
but the command is still working.. If i remove the proxtedector the command works, and it doesnt say unknown command. what is wrong?
This is the proxdetector
pawn Код:
format(string,sizeof(string),"%s and %s exchanges their vehicles.",RemoveUnderScore(playerid),RemoveUnderScore(playaid));
ProxDetector(30.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
pawn Код:
else if(strcmp(x_job,"vehicle",true) == 0)
{
new buyername[MAX_PLAYER_NAME];
if(TrySell[playerid][0]==SCRIPT_PLAYERS) {
SendClientMessage(playerid,COLOR_GRAD2,"No one has offered to sell you their car!");
return 1;
}
new cost=TrySell[playerid][1];
GetPlayerName(playerid,playername,sizeof(playername));
if(GetMoney(playerid)<cost) {
SendClientMessage(playerid,COLOR_GRAD2,"You don't even have enough cash!");
return 1;
}
playaid=TrySell[playerid][0];
if(TrySell[playaid][0]!=playerid) {
SendClientMessage(playerid,COLOR_GRAD2,"This player is offline or not trying to sell to you!");
return 1;
}
if(PlayerInfo[playerid][pCarkey]==SCRIPT_CARS) {
PlayerInfo[playerid][pCarkey]=TrySell[playerid][2];
} else if(PlayerInfo[playerid][pCarkey2]==SCRIPT_CARS) {
PlayerInfo[playerid][pCarkey2]=TrySell[playerid][2];
} else if(PlayerInfo[playerid][pCarkey3]==SCRIPT_CARS) {
PlayerInfo[playerid][pCarkey3]=TrySell[playerid][2];
} else if(PlayerInfo[playerid][pCarkey4]==SCRIPT_CARS) {
PlayerInfo[playerid][pCarkey4]=TrySell[playerid][2];
} else if(PlayerInfo[playerid][pCarkey5]==SCRIPT_CARS) {
PlayerInfo[playerid][pCarkey5]=TrySell[playerid][2];
} else {
SendClientMessage(playerid,COLOR_GRAD2,"You already have 5 vehicles.");
return 1;
}
GetPlayerName(VehicleOffer[playerid], giveplayer, sizeof(giveplayer));
strcpy(CarInfo[TrySell[playerid][2]][cOwner],playername,MAX_PLAYER_NAME);
KillPlayerCarKey(playaid,TrySell[playerid][2]);
GiveMoney(playaid,cost);
GiveMoney(playerid,-cost);
format(string,sizeof(string),"%s sold their %s to %s for $%s.",RemoveUnderScore(playerid),vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400],RemoveUnderScore(playaid),Comma(cost));
ProxDetector(30.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
TrySell[playerid][0]=SCRIPT_PLAYERS;
TrySell[playaid][0]=SCRIPT_PLAYERS;
format(tmp,sizeof(tmp),"%s sells his car to %s for $%i, Car ID %i",buyername,playername,cost,TrySell[playerid][2]); //buyername isn't the buyers name, its the sellers
PayLog(tmp);
VehicleOffer[playerid] = 999;
VehiclePrice[playerid] = 0;
UpdateAccount(playerid);
SaveCars();
return 1;
}