05.02.2009, 17:31
Hello, I have this code right here:
But it works only for 1 person. So now my question: How can I make this work for all players? So if anyone types /attachobjecttovehicle (yes, it's gonna be a shorter command lol) and then another person types that in, it will work for both.
Sorry for my bad english.
Thank you!
Код:
if (strcmp(cmdtext, "/attachobjecttovehicle", true, 10) == 0) { if(IsPlayerInAnyVehicle(playerid)) { new Float:pX, Float:pY, Float:pZ; GetPlayerPos(playerid, Float:pX, Float:pY, Float:pZ); new AttachableObject = CreateObject(18450, Float:pX, Float:pY, Float:pZ, 0, 0, 0); AttachObjectToPlayer(AttachableObject, playerid, 0.0, 0.0, -0.87, 0.0, 0.0, 90.0); SendClientMessage(playerid, COLOR_YELLOW, "Object Successfully Attached!"); } else { SendClientMessage(playerid, COLOR_RED, "You Need To Be In A Vehicle Before Attaching An Object!"); } return 1; }
Sorry for my bad english.
Thank you!
