public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/addlaser", cmdtext, true, 10) == 0)
{
if(GetPlayerWeapon(playerid) == 34)
{
SetPlayerAttachedObject(playerid,3 , 18643, 6, 0.158249, 0.010233, 0.128052, 6.868255, 351.962524, 356.884216);
return 1;
} else return SendClientMessage(playerid, COLOR_GREEN, "You cannot add a laser to this weapon!");
}
return 0;
}
if (strcmp("/addlaser", cmdtext, true, 10) == 0)
{
if(GetPlayerWeapon(playerid) == 34)
{
SetPlayerAttachedObject(playerid,3 , 18643, 6, 0.158249, 0.010233, 0.128052, 6.868255, 351.962524, 356.884216);
} else return SendClientMessage(playerid, 0x660066AA, "You cannot add a laser to this weapon!");
}
Have you tested this?
pawn Код:
|
if (strcmp("/addlaser", cmdtext, true, 10) == 0)
{
if(GetPlayerWeapon(playerid) == 34)
{
SetPlayerAttachedObject(playerid,3 , 18643, 6, 0.158249, 0.010233, 0.128052, 6.868255, 351.962524, 356.884216);
return 1;
} else return SendClientMessage(playerid, COLOR_GREEN, "You cannot add a laser to this weapon!");
}
if (strcmp("/addlaser", cmdtext, true, 10) == 0)
{
if(GetPlayerWeapon(playerid) == 34)
{
SetPlayerAttachedObject(playerid,3 , 18643, 6, 0.158249, 0.010233, 0.128052, 6.868255, 351.962524, 356.884216);
} else return SendClientMessage(playerid, 0x660066AA, "You cannot add a laser to this weapon!");
}
if (strcmp("/addlaser", cmdtext, true, 10) == 0)
{
SetPlayerAttachedObject(playerid,3 , 18643, 6, 0.158249, 0.010233, 0.128052, 6.868255, 351.962524, 356.884216);
return 1;
}
if (strcmp("/addlaser", cmdtext, true, 10) == 0)
{
if(GetPlayerWeapon(playerid) == 34) SendClientMessage(playerid, 0x660066AA, "You cannot add a laser to this weapon!");
else
{
SetPlayerAttachedObject(playerid,3 , 18643, 6, 0.158249, 0.010233, 0.128052, 6.868255, 351.962524, 356.884216);
}
return 1;
}
if(GetPlayerWeapon(playerid) == 34) SendClientMessage(playerid, 0x660066AA, "You cannot add a laser to this weapon!");
How can that work...
pawn Код:
|