| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 305 online users. » 0 Member(s) | 302 Guest(s) Bing, Google, Baidu
|
|
|
| crane object id |
|
Posted by: DanMas - 2021-01-03, 10:49 AM - Forum: Support
- No Replies
|
 |
hello! i wanna ask you for help about crane object ids, what you can see on picture. It is 1380 1379 1382 objects 'silhouette'? I removed these objects and can't remove this... and nothing can found about this ids. maybe you know or you could give me advice where i can found this ids. Map Editor didn't see these objects at all. thanks anyway
![[Image: P1OqWTC.png]](https://i.imgur.com/P1OqWTC.png)
its?1398?1399 1400 . thanks xD
Resolved
|
|
|
|
| Array Size |
|
Posted by: Torque - 2021-01-03, 06:57 AM - Forum: Pawn Scripting
- Replies (3)
|
 |
What's the max array size? Or line size for a variable? I'm getting?error 075: input line too long (after substitutions)?
|
|
|
|
| [AJUDA]Comando Bugando Port?o, caixa e Movel. |
|
Posted by: willian franco - 2021-01-03, 12:32 AM - Forum: Portuguese/Portugu?s
- No Replies
|
 |
Boa noite, ja alterei o comando de varias formas para n?o dar esse bug porem nao deram errado,
O m?vel? quando ? posicionado e clica em salvar ? criado uma caixa de item quando alterado aparece um port?o no lugar,?
Code: public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz){
? ? ? ? ? ? if(response == 1 || response == 0){
? ? ? ? ? ? ? if(EditandoCaixa[playerid] > -1)
? {
? ? ? ? ? ? ? ? new i = EditandoCaixa[playerid];
? ? DestroyDynamic3DTextLabel(SistemaCaixa[i][Caixa3d]);
? ? //format(SistemaCaixa[i][CaixaText],300,"{CD853F}? {ffffff}Caixa de Itens{CD853F} ?\n{CD853F}Dono: {ffffff}%s\n{CD853F}Itens: {ffffff}%d/50\nAperte ' {CD853F}F{ffffff} ' para usar.",NomePlayer(playerid),ItemsCaixa(i));
? ? ? ? ? ? ? ? format(SistemaCaixa[i][CaixaText],300,"Caixa de Itens\n\n\
Propriet?rio: {00BFFF}%s\n\
{FFFFFF}Itens: {00BFFF}%d/50\n\n\
{FFFFFF}Aperte a letra {00aaff}ALT{FFFFFF} para usar",NomePlayer(playerid),ItemsCaixa(i));
SendClientMessage(playerid, -1, "Voce salvou sua Caixa de Itens neste Local.");
? ? SistemaCaixa[i][Caixa3d] = CreateDynamic3DTextLabel(SistemaCaixa[i][CaixaText], -1, x,y, z, 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID,? 0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 100.0);
format(SistemaCaixa[i][CaixaDono],40, NomePlayer(playerid));
SistemaCaixa[i][CaixaX] = x;
SistemaCaixa[i][CaixaY] = y;
SistemaCaixa[i][CaixaZ] = z;
SistemaCaixa[i][CaixaRX] = rx;
SistemaCaixa[i][CaixaRY] = ry;
SistemaCaixa[i][CaixaRZ] = rz;
SistemaCaixa[i][CaixaInterior] = GetPlayerInterior(playerid);
SistemaCaixa[i][CaixaMundo] = GetPlayerVirtualWorld(playerid);
DestroyDynamicObject(SistemaCaixa[i][CaixaObj]);
SistemaCaixa[i][CaixaObj] = CreateDynamicObject(1271, x,y,z,rx,ry,rz,GetPlayerInterior(playerid),GetPlayerVirtualWorld(playerid),-1,200,0);
? ? Streamer_Update(playerid);
? ? new Filea[60];
? ? format(Filea,60,"Caixas/Caixa_%d.ini",i);
if(!IsValidDynamicObject(SistemaCaixa[i][CaixaObj]))
{
if(DOF2_FileExists(Filea)) DOF2_CreateFile(Filea);
? ? DOF2_SetString(Filea,"CaixaDono", SistemaCaixa[i][CaixaDono] );
? ? //DOF2_SetString(Filea,"CaixaText", SistemaCaixa[i][CaixaText] );
? ? DOF2_SetFloat(Filea,"CaixaX", SistemaCaixa[i][CaixaX] );
? ? DOF2_SetFloat(Filea,"CaixaY", SistemaCaixa[i][CaixaY] );
? ? DOF2_SetFloat(Filea,"CaixaZ", SistemaCaixa[i][CaixaZ] );
? ? DOF2_SetFloat(Filea,"CaixaRX", SistemaCaixa[i][CaixaRX] );
? ? DOF2_SetFloat(Filea,"CaixaRY", SistemaCaixa[i][CaixaRY] );
? ? DOF2_SetFloat(Filea,"CaixaRZ", SistemaCaixa[i][CaixaRZ] );
DOF2_SetInt(Filea,"CaixaInterior", SistemaCaixa[i][CaixaInterior] );
DOF2_SetInt(Filea,"CaixaMundo",? SistemaCaixa[i][CaixaMundo] );
new str[30];
for(new o; o<50; o)
{
format(str,30,"CaixaItem%d",o);
DOF2_SetInt(Filea,str,SistemaCaixa[i][CaixaItem][o]);
format(str,30,"CaixaUnidades%d",o);
DOF2_SetInt(Filea,str,SistemaCaixa[i][CaixaUnidades][o]);
}
? ? ? ? ? ? ? ? ? ? EditandoCaixa[playerid] = -1;
? ? ? ? DOF2_SaveFile();
? ? }
? return 1;
}
? ? ? if(EditandoPortao[playerid] > -1)
{
? ? new i = EditandoPortao[playerid];
? ? DestroyDynamic3DTextLabel(SistemaPortao[i][Portao3d]);
? ? new str[300];
? ? format(str,300,"{CD853F}Portao de {ffffff}%s{CD853F} buzine ou\ndigite {ffffff}/abrirportao{CD853F} para abrir",NomePlayer(playerid));
? ? SendClientMessage(playerid, -1, "A posi??o do seu Port?o foi salva neste Local ! Para mais informa??es use: /ajuda.");
SistemaPortao[i][Portao3d] = CreateDynamic3DTextLabel(SistemaPortao[i][PortaoText], -1, x,y, z, 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID,? 0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 100.0);
format(SistemaPortao[i][PortaoDono],40, NomePlayer(playerid));
SistemaPortao[i][PortaoX] = x;
SistemaPortao[i][PortaoY] = y;
SistemaPortao[i][PortaoZ] = z;
SistemaPortao[i][PortaoRX] = rx;
SistemaPortao[i][PortaoRY] = ry;
SistemaPortao[i][PortaoRZ] = rz;
SistemaPortao[i][PortaoInterior] = GetPlayerInterior(playerid);
SistemaPortao[i][PortaoMundo] = GetPlayerVirtualWorld(playerid);
DestroyDynamicObject(SistemaPortao[i][PortaoObj]);
SistemaPortao[i][PortaoObj] = CreateDynamicObject(980, x,y,z,rx,ry,rz,GetPlayerInterior(playerid),GetPlayerVirtualWorld(playerid),-1,200,0);
? ? //SetDynamicObjectPos(SistemaPortao[i][PortaoObj], x,y,z);
? ? //SetDynamicObjectRot(SistemaPortao[i][PortaoObj], rx,ry,rz);
? ? Streamer_Update(playerid);
? ? new Filea[60];
? ? format(Filea,60,"Portoes/Portao_%d.ini",i);
if(!IsValidDynamicObject(SistemaPortao[i][PortaoObj]))
{
if(DOF2_FileExists(Filea)) DOF2_CreateFile(Filea);
? ? DOF2_SetString(Filea,"PortaoDono", SistemaPortao[i][PortaoDono] );
? ? DOF2_SetString(Filea,"PortaoText", SistemaPortao[i][PortaoText] );
? ? DOF2_SetFloat(Filea,"PortaoX", SistemaPortao[i][PortaoX] );
? ? DOF2_SetFloat(Filea,"PortaoY", SistemaPortao[i][PortaoY] );
? ? DOF2_SetFloat(Filea,"PortaoZ", SistemaPortao[i][PortaoZ] );
? ? DOF2_SetFloat(Filea,"PortaoRX", SistemaPortao[i][PortaoRX] );
? ? DOF2_SetFloat(Filea,"PortaoRY", SistemaPortao[i][PortaoRY] );
? ? DOF2_SetFloat(Filea,"PortaoRZ", SistemaPortao[i][PortaoRZ] );
DOF2_SetInt(Filea,"PortaoInterior", SistemaPortao[i][PortaoInterior] );
DOF2_SetInt(Filea,"PortaoMundo",? SistemaPortao[i][PortaoMundo] );
? ? DOF2_SaveFile();
}
? ? EditandoPortao[playerid] = -1;
? ? return 1;
? }
? ? ? ? ? ? if(GetPVarInt(playerid, "editandoh") != 999){
? ? ? ? ? ? new
? ? ? ? ? ? ? ? m = GetPVarInt(playerid, "editMovel"),
? ? casaid = PlayerInfo[playerid][pPHousekey];
if(response == 1){
MobInfo[casaid][m][mobX] = x;
MobInfo[casaid][m][mobY] = y;
MobInfo[casaid][m][mobZ] = z;
MobInfo[casaid][m][mobRX] = rx;
MobInfo[casaid][m][mobRY] = ry;
MobInfo[casaid][m][mobRZ] = rz;
DestroyDynamicObject(MobInfo[casaid][m][mobObject]);
MobInfo[casaid][m][mobObject] = CreateDynamicObject(MobInfo[casaid][m][mobModel], x, y, z, rx, ry, rz, GetPlayerVirtualWorld(playerid));
}else{
? ? MobInfo[casaid][m][mobCreated] = 0;
? ? DestroyDynamicObject(MobInfo[casaid][m][mobObject]);
}
? ? ? ? ? ? SetPVarInt(playerid, "editandoh", 0);
? ? ? ? salvarMoveis(casaid);
? }
}
return 1;
}
estou a dois dias alterando e testando e da o mesmo erro, acredito que o problema esta nesse public.
Obrigado.
|
|
|
|
| [HELP] Spec on NPC |
|
Posted by: spyrothedragon96 - 2021-01-02, 04:43 PM - Forum: Pawn Scripting
- Replies (1)
|
 |
Hi everyone, I have a little problem with this script.
This script allows you to attack the camera on the npc via the command /camera, but once the camera is attached on the npc, I cannot change the view as you normally do on the player (usually with the V key).
Is it possible to do this?
Then another problem: when an NPC is in an interior, the interior is not visible.
This is the script.
Code: #include <a_samp>
#include <sscanf2>
#include <zcmd>
new IsSpectating[MAX_PLAYERS];
new Float:PosBeforeSpec[MAX_PLAYERS][3];
new InteriorBeforeSpec[MAX_PLAYERS];
new bool:LastTimeSpeced[MAX_PLAYERS];
ResetPlayerStats(playerid)
{
IsSpectating[playerid] = INVALID_PLAYER_ID;
PosBeforeSpec[playerid][0] = 0.0, PosBeforeSpec[playerid][1] = 0.0, PosBeforeSpec[playerid][2] = 0.0;
InteriorBeforeSpec[playerid] = 0;
LastTimeSpeced[playerid] = false;
}
public OnPlayerDisconnect(playerid, reason)
{
for(new i; i < MAX_PLAYERS; i)
{
if(IsSpectating[i] == playerid)
{
cmd_cameraoff(i, "");
}
}
ResetPlayerStats(playerid); //@@@WARNING: KEEP THIS LINE AT THE BOTTOM RIGHT HERE OR THINGS MAY BEHAVE DIFFERENT THAN EXPECTED!!!
return 1;
}
public OnPlayerSpawn(playerid)
{
if(LastTimeSpeced[playerid])
? ? {
? ? LastTimeSpeced[playerid] = false;
SetPlayerInterior(playerid, InteriorBeforeSpec[playerid]);
SetPlayerPos(playerid, PosBeforeSpec[playerid][0], PosBeforeSpec[playerid][1], PosBeforeSpec[playerid][2]);
? ? }
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_ONFOOT || newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
? ? {
? ? ? ? for(new i; i < MAX_PLAYERS; i)
? ? ? ? {
? ? ? ? ? ? if(IsSpectating[i] == playerid)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? SetPlayerToSpectatePlayer(i, playerid);
? ? ? ? ? ? }
? ? ? ? }
? ? }
? ? return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
if(newinteriorid != oldinteriorid)
{
for(new i; i < MAX_PLAYERS; i)
{
if(IsSpectating[i] == playerid && GetPlayerState(i) == PLAYER_STATE_SPECTATING)
{
SetPlayerToSpectatePlayer(i, playerid);
}
}
}
return 1;
}
CMD:camera(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "Usa: /camera <playerid/nome>");
if(!IsPlayerConnected(targetid) || !IsPlayerNPC(targetid)) return SendClientMessage(playerid, -1, "Player id invalido.");
if(playerid == targetid) return SendClientMessage(playerid, -1, "Non puoi guardare te stesso.");
//if(IsSpectating[targetid] != INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "That player is already watching someone.");
//if(GetPlayerState(targetid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, -1, "Player is in spectating mode. (Possibly didn't spawn yet)");
SetPlayerToSpectatePlayer(playerid, targetid);
if(IsSpectating[playerid] == INVALID_PLAYER_ID)
{
new str[156];
format(str, sizeof(str), "Ora stai guardando [%i]%s. Usa /cameraoff per smettere di guardarlo o /camera <id> per guardare un altro player.", targetid);
SendClientMessage(playerid, -1, str);
}
return 1;
}
CMD:cameraoff(playerid, params[])
{
if(IsSpectating[playerid] == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Non stai guardando nessuno.");
LastTimeSpeced[playerid] = true;
StopPlayerSpectatePlayer(playerid);
return 1;
}
SetPlayerToSpectatePlayer(playerid, targetid)
{
IsSpectating[playerid] = targetid;
//Last pos before specing (if he was specing we don't get the next spec)
if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
{
GetPlayerPos(playerid, PosBeforeSpec[playerid][0], PosBeforeSpec[playerid][1], PosBeforeSpec[playerid][2]);
InteriorBeforeSpec[playerid] = GetPlayerInterior(playerid);
}
new targetInterior = GetPlayerInterior(targetid);
SetPlayerInterior(playerid, targetInterior);
TogglePlayerSpectating(playerid, 1);
if(GetPlayerState(targetid) == PLAYER_STATE_DRIVER || GetPlayerState(targetid) == PLAYER_STATE_PASSENGER)
{
new vehToSpec = GetPlayerVehicleID(targetid);
PlayerSpectateVehicle(playerid, vehToSpec);
}
else PlayerSpectatePlayer(playerid, targetid);
return 1;
}
StopPlayerSpectatePlayer(playerid)
{
IsSpectating[playerid] = INVALID_PLAYER_ID;
TogglePlayerSpectating(playerid, 0);
SetPlayerInterior(playerid, InteriorBeforeSpec[playerid]);
SetPlayerPos(playerid, PosBeforeSpec[playerid][0], PosBeforeSpec[playerid][1], PosBeforeSpec[playerid][2]);
}
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]
[/font][/size][/color]
|
|
|
|
| PlayerTextDrawSetString |
|
Posted by: Torque - 2021-01-02, 02:13 AM - Forum: Pawn Scripting
- Replies (2)
|
 |
I'm having an issue with this function. I have the below code:
Code: new zone[28];
GetPlayer3DZone(i, zone, MAX_ZONE_NAME);
PlayerTextDrawSetString(i, p_LocationTextdraw[i][1], zone);
The issue is that when it prints it onto the screen, every word is on a new line. I know that a string is meant to be something like "This_is_one_line" but since the 3D Zone string that's produced has spaces instead of underscores, it's difficult to get it to work correct.
Any tips?
Code: stock GetPlayer3DZone(playerid, zone[], len) //Credits to Cueball, Betamaster, Mabako, and Simon (for finetuning).
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i != sizeof(gSAZones); i )
{
if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4] && z >= gSAZones[i][SAZONE_AREA][2] && z <= gSAZones[i][SAZONE_AREA][5])
{
? ? return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
}
}
return 0;
}
|
|
|
|
| Customization for skins (peds and CJ) |
|
Posted by: vico - 2021-01-02, 02:12 AM - Forum: Questions and Suggestions
- Replies (1)
|
 |
- Be able to set per-skin walking styles (mostly for those who wants to keep the walking style for default peds but fix the peds with rollers);
- Change CJ (skin ID 0) clothing and stats like fatness and buffness, like MTA does (the function can return a different value if it can't change the clothing/body value due to the player have other ped as a skin).
- Be able to add CJs with different body stats and clothing in AddPlayerClass.
|
|
|
|
| YSI/y_ini |
|
Posted by: tootsao - 2021-01-01, 05:48 PM - Forum: Pawn Scripting
- Replies (2)
|
 |
Hello, i have ini login/register?system with y_ini and i want to ask how do i make lime house or vehicle?system that uses?y_ini to save and load?
|
|
|
|
|