25.07.2016, 22:56
The title says it all
pawn Код:
dcmd_carpet(playerid,param[])
{
#pragma unused param
if(Carpet[playerid] == -1)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
Carpet[playerid] = CreateObject(980, x + 0.5, y, z + pOffset[playerid], 0.00, 0.00, 0.00);
AttachObjectToPlayer( Carpet[playerid], playerid, 0.5, 0.0, pOffset[playerid], 90.0, 0.0, 90.0 );
SendSystemMessage(playerid,"Magic carpet ride!");
SendSystemMessage(playerid,"Use /offset to adjust height.");
} else {
DestroyObject(Carpet[playerid]);
Carpet[playerid] = -1;
SendSystemMessage(playerid,"Carpet removed.");
}
return 1;
}