Helmet bug
#3

pawn Код:
CMD:kask(playerid,params[])
{
new vehicleid = GetPlayerVehicleID(playerid);
if(AracMotorsa(vehicleid))
{
if(KaskTakili[playerid] == 0)
{
SetPlayerAttachedObject(playerid, 1, 18977, 2, 0.07, 0, 0, 88, 75, 0);
new string[256];
GetPlayerName(playerid, string,sizeof(string));
format(string,sizeof(string),"*%s kaskını takar.",string);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
KaskTakili[playerid] = 1;
}
else
{
RemovePlayerAttachedObject(playerid, 1);
new string[256];
GetPlayerName(playerid, string,sizeof(string));
format(string,sizeof(string),"*%s kaskını зıkartır.",string);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
KaskTakili[playerid] = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_YELLOW2, "{FF0000}(( {00FF00}[HATA]: {FFFFFF}Bu komut sadece motorlarda ve bisikletlerde зalışır. {FF0000} ))");
}
return 1;
}
This is the command and this is "AracMotorsa" callback:

pawn Код:
forward AracMotorsa(vehicleid);
public AracMotorsa(vehicleid)
{
new a = GetVehicleModel(vehicleid);
if (a == 509 || a == 481 || a == 510 || a == 462 ||a == 448 || a == 581 || a == 522 || a == 461 || a == 521 || a == 523 || a == 463 || a == 586 || a == 468 || a == 471)
{
return 1;
}
return 0;
}
And yeah, I want to attach a toy to the player's head when he does the command, and it actually does but disappears immediately after it appears.
Reply


Messages In This Thread
Helmet bug - by Rufio - 01.06.2014, 12:52
Re: Helmet bug - by Drago987 - 01.06.2014, 12:56
Re: Helmet bug - by Rufio - 01.06.2014, 12:58
Re: Helmet bug - by Drago987 - 01.06.2014, 13:05
Re: Helmet bug - by Rufio - 01.06.2014, 13:12
Re: Helmet bug - by Threshold - 01.06.2014, 14:11

Forum Jump:


Users browsing this thread: 2 Guest(s)