31.05.2010, 23:50
I have a /dumpcar command, to simply a-sell a players car, or for them to just 'dump' it.. but it says NOTHING in-game, not even a word.. help?
pawn Код:
if(strcmp(cmd, "/dumpcar", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "/dumpcar [1/2 (car slot)]");
return 1;
}
new slota = strval(tmp);
if(slota == 1) {
if(PlayerInfo[playerid][pCKey] == 255) {
SendClientMessage(playerid, COLOR_RED, " You don't have a car in this slot!"); return 1; }
new carid1 = PlayerInfo[playerid][pCKey];
CInfo[carid1-1][cBought] = 0;
CInfo[carid1-1][cGPS] = 0;
CInfo[carid1-1][cLaser] = 0;
CInfo[carid1-1][cLock] = 0;
CInfo[carid1-1][cAlarm] = 0;
PlayerInfo[playerid][pCKey] = 255;
strmid(CInfo[carid1-1][cOwner], "The State", 0, strlen("The State"), 255);
SendClientMessage(playerid, COLOR_GREY, "You have dumped your car, recieved no money back!");
OnPropUpdate();
return 1;
}
else if(slota == 2) {
if(PlayerInfo[playerid][pCKey2] == 255) {
SendClientMessage(playerid, COLOR_RED, " You don't have a car in this slot!"); return 1; }
new carid2 = PlayerInfo[playerid][pCKey2];
CInfo[carid2-1][cBought] = 0;
CInfo[carid2-1][cGPS] = 0;
CInfo[carid2-1][cLaser] = 0;
CInfo[carid2-1][cLock] = 0;
CInfo[carid2-1][cAlarm] = 0;
PlayerInfo[playerid][pCKey2] = 255;
strmid(CInfo[carid2-1][cOwner], "The State", 0, strlen("The State"), 255);
SendClientMessage(playerid, COLOR_GREY, "You have dumped your car, recieved no money back!");
OnPropUpdate();
}
}
return 1;
}