21.10.2010, 00:29
Vб no FS, procure no comando "/car"
Procure por:
Troque por:
Procure por:
pawn Код:
if(strcmp(tmp, "sell", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
if(PlayerInfo[playerid][pCarKey] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You don't own a car.");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pCarKey]][cOwner], true) == 0)
{
new car = PlayerInfo[playerid][pCarKey];
CarInfo[car][cOwned] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999);
GivePlayerMoney(playerid,CarInfo[car][cValue]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~You have sold your car for: ~n~~g~$%d", CarInfo[car][cValue]);
GameTextForPlayer(playerid, string, 10000, 3);
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pCarKey] = 999;
return 1;
}
}
return 1;
}
pawn Код:
if(strcmp(tmp, "sell", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
if(PlayerInfo[playerid][pCarKey] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You don't own a car.");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pCarKey]][cOwner], true) == 0)
{
new car = PlayerInfo[playerid][pCarKey];
CarInfo[car][cOwned] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999);
GivePlayerMoney(playerid,CarInfo[car][cValue]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~You have sold your car for: ~n~~g~$%d", CarInfo[car][cValue]);
GameTextForPlayer(playerid, string, 10000, 3);
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pCarKey] = 0;
return 1;
}
}
return 1;
}