11.12.2017, 18:19
(
Последний раз редактировалось Marllun; 11.12.2017 в 20:02.
)
O que eu vir aqui na wiki samp, nгo sei se eu estou certo tenta ai.
PHP код:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 300.0);
PHP код:
stock PlayerCreateGrafite(playerid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Ip)
{
new msg[256], strpt[128], strpt2[128], grafitefile[128],
grafiteid[MAX_PLAYERS];
for(new grafite = 0; grafite < MAX_GRAFITES; grafite++)
{
format(strpt2, sizeof(strpt2), PASTA_GRAFITES, grafite);
if(dini_Exists(strpt2))
{
if(IsPlayerInRangeOfPoint(playerid, 30.0, dini_Float(strpt2, "gCordX"), dini_Float(strpt2, "gCordY"), dini_Float(strpt2, "gCordZ")))
{
SendClientMessage(playerid, Vermelho, "Nгo pode ser criado mais grafites neste local.");
return 1;
}
if(dini_Int(strpt2, "gDono") == 3)
{
dini_FloatSet(strpt2, "gCordX", x);
dini_FloatSet(strpt2, "gCordY", y);
dini_FloatSet(strpt2, "gCordZ", z);
dini_FloatSet(strpt2, "gCordRX", rx);
dini_FloatSet(strpt2, "gCordRY", ry);
dini_FloatSet(strpt2, "gCordRZ", rz);
dini_IntSet(strpt2, "IntID", Ip);
format(msg, 128, "{%s}%s", GraffitiColor[playerid], GraffitiText[playerid]);
grafiteid[playerid] = CreateDynamicObject(19482, x, y, z, rx, ry, rz, 0, 0, -1, 200.0);
SetDynamicObjectMaterialText(grafiteid[playerid], 0, msg, OBJECT_MATERIAL_SIZE_256x256, "Arial", 40, 0, 0xFFFFFFFF, 0, 1);
dini_IntSet(strpt2, "Id", grafiteid[playerid]);
dini_IntSet(strpt2, "gDono", 0);
dini_Set(strpt2, "Dono", GetPlayerNameEx(playerid));
return 1;
}
}
}
if(proximografite >= MAX_GRAFITES-1)
{
format(STRX, sizeof(STRX), "O limite de %d grafites foi atingido, nгo й possнvel criar mais.", MAX_PORTOES);
SendClientMessage(playerid, Vermelho, STRX);
return 1;
}
format(strpt, sizeof(strpt), PASTA_GRAFITES, proximografite);
if(dini_Exists(strpt))
{
proximografite++;
}
format(grafitefile, sizeof(grafitefile), PASTA_GRAFITES, proximografite);
dini_Create(grafitefile);
dini_FloatSet(grafitefile, "gCordX", x);
dini_FloatSet(grafitefile, "gCordY", y);
dini_FloatSet(grafitefile, "gCordZ", z);
dini_FloatSet(grafitefile, "gCordRX", rx);
dini_FloatSet(grafitefile, "gCordRY", ry);
dini_FloatSet(grafitefile, "gCordRZ", rz);
dini_IntSet(grafitefile, "IntID", Ip);
format(msg, 128, "{%s}%s", GraffitiColor[playerid], GraffitiText[playerid]);
grafiteid[playerid] = CreateDynamicObject(19482, x, y, z, rx, ry, rz, 0, 0, -1, 200.0);
SetDynamicObjectMaterialText(grafiteid[playerid], 0, msg, OBJECT_MATERIAL_SIZE_256x256, "Arial", 40, 0, 0xFFFFFFFF, -1, 1);
dini_IntSet(grafitefile, "Id", grafiteid[playerid]);
dini_IntSet(grafitefile, "gDono", 0);
dini_Set(grafitefile, "Dono", GetPlayerNameEx(playerid));
proximografite++;
return 1;
}