Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: rathore on March 30, 2014, 10:17:33 pm
-
Onplayertext
[pawn]else if(strcmp(cmd, "!fix", true)==0)
{
if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, 0xFF0000AA, "You're on foot");
else {
new Float:vhp, vid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vid, vhp);
if(vhp == 1000) SendClientMessage(playerid, 0xFF0000AA, "Your vehicle is okay");
else{
new cash = GetPlayerMoney(playerid);
if(cash <= 299) SendClientMessage(playerid, 0xFF0000AA, "You're poor buddy");
else {
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired");
SetVehicleHealth(vid, 1000);
DecPlayerHandCash( playerid, 300 );}
}
}
}
[/pawn]
-
You cant make timer inside CMD Did you read this (http://forum.vicecitymultiplayer.com/index.php?topic=5517.0) ?
-
the loop for this, or am I wrong? ???
-
You cant make timer inside CMD Did you read this (http://forum.vicecitymultiplayer.com/index.php?topic=5517.0) ?
Thanks
Now fixed without timer
-
[pawn]else if(strcmp(cmd, "!fix", true)==0)
{
if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, 0xFF0000AA, "You're on foot");
else {
new Float:vhp, vid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vid, vhp);
if(vhp == 1000) SendClientMessage(playerid, 0xFF0000AA, "Your vehicle is okay");
else{
new cash = GetPlayerMoney(playerid);
if(cash <= 299) SendClientMessage(playerid, 0xFF0000AA, "You're poor buddy");
else {
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired");
SetVehicleHealth(vid, 1000);
DecPlayerHandCash( playerid, 300 );}
}
}
}
[/pawn]
Did it work? Huh, amazing, I didnt know I can post working code from mobile phone
-
[pawn]else if(strcmp(cmd, "!fix", true)==0)
{
if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, 0xFF0000AA, "You're on foot");
else {
new Float:vhp, vid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vid, vhp);
if(vhp == 1000) SendClientMessage(playerid, 0xFF0000AA, "Your vehicle is okay");
else{
new cash = GetPlayerMoney(playerid);
if(cash <= 299) SendClientMessage(playerid, 0xFF0000AA, "You're poor buddy");
else {
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired");
SetVehicleHealth(vid, 1000);
DecPlayerHandCash( playerid, 300 );}
}
}
}
[/pawn]
Did it work? Huh, amazing, I didnt know I can post working code from mobile phone
your cmd have got many bugs i fixed then it works :-)
-
well what are these bugs for example?
-
well what are these bugs for example?
[pawn]else if(strcmp(cmd, "!fix", true)==0)
{
if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, 0xFF0000AA, "You're on foot");
else {
new Float:vhp, vid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vid, vhp);
if(vhp == 1000) SendClientMessage(playerid, 0xFF0000AA, "Your vehicle is okay");
else{
new cash = GetPlayerMoney(playerid);
if(cash <= 299) SendClientMessage(playerid, 0xFF0000AA, "You're poor buddy");
else {
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired");
SetVehicleHealth(vid, 1000);
DecPlayerHandCash( playerid, 300 );}
}
}
}
[/pawn]
Did it work? Huh, amazing, I didnt know I can post working code from mobile phone
your cmd have got many bugs i fixed then it works :-)
its not nesk's code bug. that is a pawno code bug. in bbc code of pawno in forum..
the code works ..