Kako da ubacim attach u skriptu, probo sam iz drugih modova al dobivam previše errora kad bi išo jedan po jedan do ujutru bi valjda ih sve rišio , znal ko kako da ubacim ?
/ubaciattachuskriptu
#include <a_samp>
new attachedObject[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
attachedObject[playerid] = INVALID_OBJECT_ID;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/attach", true))
{
if(attachedObject[playerid] != INVALID_OBJECT_ID)
{
DetachObject(attachedObject[playerid]);
attachedObject[playerid] = INVALID_OBJECT_ID;
SendClientMessage(playerid, -1, "You detached the object.");
}
else
{
new Float:pos[3], Float:rot[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerFacingAngle(playerid, rot[0]);
rot[0] = 0.0;
attachedObject[playerid] = CreateObject(1337, pos[0], pos[1], pos[2], rot[0], rot[1], rot[2]);
AttachObjectToPlayer(attachedObject[playerid], playerid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
SendClientMessage(playerid, -1, "You attached an object to yourself.");
}
return 1;
}
return 0;
}
public OnPlayerDisconnect(playerid, reason)
{
if(attachedObject[playerid] != INVALID_OBJECT_ID)
{
DetachObject(attachedObject[playerid]);
DestroyObject(attachedObject[playerid]);
attachedObject[playerid] = INVALID_OBJECT_ID;
}
return 1;
}
ovo ti je najjednostavija skripta, dodaj jos nesto ako zelis
Citat: tony_ poslato Avgust 08, 2023, 20:19:17 POSLE PODNE
Kako da ubacim attach u skriptu, probo sam iz drugih modova al dobivam previše errora kad bi išo jedan po jedan do ujutru bi valjda ih sve rišio , znal ko kako da ubacim ?
ne niko ne zna to je kvantna fizika ???
Pravila. Lock