SA-MP textures not loading at first spawn
#1

Hi,
I am new to pawno and i am getting the below problems,i hope i will get a solution of these here.

1.When i join my server the Objects are not loading at my first spawn.I need to type /kill to see them at respawn.
2.When i use the command /kill ,it kill the player but in chat it shows "Server Unknown command".I wanna know how can i fix it(like it shows other message"You have killed yourself" in red color).
3.It is also showing a warning when i compile it,if you have any solution for it than it would be helpful for me.

I had just started scripting so i don't know much about terms so i started to edit default bare.pwn file and i am pasting my whole pawno code below

Quote:

#include <a_samp>
#include <core>
#include <float>

#pragma tabsize 0

main()
{
print("\n----------------------------------");
print(" Bare Script\n");
print("----------------------------------\n");
}

public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"~w~SAMP: ~r~CW/TG Server",5000,5);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 0.0);

}

return 0;
}

public OnPlayerSpawn(playerid) {
SetPlayerPos(playerid,-1313.267,5.572,13.0);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}

SetupPlayerForClassSelection(playerid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}

public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
return 1;
}

public OnGameModeInit()
{
SetGameModeText("Bare Script");
ShowPlayerMarkers(1);
ShowNameTags(1);
AllowAdminTeleport(1);

AddPlayerClass(265,1958.3783,1343.1572,15.3746,270 .1425,0,0,0,0,-1,-1);

return 1;
}

strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}

For video check this link :https://*********/DE7bzNXBetQ


Regards,
MarquX
Reply
#2

Quote:
Originally Posted by MarquX
Посмотреть сообщение
Hi,
I am new to pawno and i am getting the below problems,i hope i will get a solution of these here.

1.When i join my server the Objects are not loading at my first spawn.I need to type /kill to see them at respawn.
2.When i use the command /kill ,it kill the player but in chat it shows "Server Unknown command".I wanna know how can i fix it(like it shows other message"You have killed yourself" in red color).
3.It is also showing a warning when i compile it,if you have any solution for it than it would be helpful for me.

I had just started scripting so i don't know much about terms so i started to edit default bare.pwn file and i am pasting my whole pawno code below



For video check this link :https://*********/DE7bzNXBetQ

Regards,
MarquX
PHP код:
public OnPlayerSpawn(playerid) {
SetPlayerPos(playerid,-1313.267,5.572,13.0);
SetPlayerInterior(playerid,0);
return 
1;

Reply
#3

Thanks for help,its working fine now
Reply
#4

Quote:
Originally Posted by MarquX
Посмотреть сообщение
Thanks for help,its working fine now
Your welcome, i new comeback script few days here
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)