Show Players Rank Once They Join Server (ZCMD) -
Eminem 2ka9 - 05.08.2012
I'm using a filterscript known as ZCMD, I added this code to the onplayerspawn and it doesn't seem to be working when the player spawns nothing at all appears, yet the script compiles successfully.
Код:
public OnPlayerSpawn(playerid)
{
CallRemoteFunction("GetPlayerRankInfo", "d", playerid);
GivePlayerWeapon(playerid,27,1000);
GivePlayerWeapon(playerid,25,1000);
GivePlayerWeapon(playerid,28,1000);
GivePlayerWeapon(playerid,34,500);
GivePlayerWeapon(playerid,24,500);
}
I basically want it to show the persons rank when he/she spawns.
This is the code that should work:
Код:
strcat(tmp, rank);
SendClientMessage(playerid, COLOR_WHITE, tmp);
format(string, sizeof(string),"Name:%s - Your Current Score: "#COL_GREEN#"%d]",Pname, score);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
Re: Show Players Rank Once They Join Server (ZCMD) -
Cxnnor - 05.08.2012
Try:
pawn Код:
public OnPlayerSpawn(playerid)
{
GetPlayerRankInfo(playerid);
format(string, sizeof(string), "%s has joined the server, his rank is %d.", PlayerName, PlayerRank);
SendClientMessageToAll(COLOR_GREY, string);
GivePlayerWeapon(playerid,27,1000);
GivePlayerWeapon(playerid,25,1000);
GivePlayerWeapon(playerid,28,1000);
GivePlayerWeapon(playerid,34,500);
GivePlayerWeapon(playerid,24,500);
return 1;
}
Make sure you have stored variables defining it.
Regards, Connor.
Re: Show Players Rank Once They Join Server (ZCMD) -
Eminem 2ka9 - 05.08.2012
I got some errors doing that!
Код:
C:\Users\Administration\Desktop\My Script\gamemodes\MyScript.pwn(1391) : error 017: undefined symbol "GetPlayerRankInfo"
C:\Users\Administration\Desktop\My Script\gamemodes\MyScript.pwn(1392) : error 017: undefined symbol "string"
C:\Users\Administration\Desktop\My Script\gamemodes\MyScript.pwn(1392) : error 017: undefined symbol "string"
C:\Users\Administration\Desktop\My Script\gamemodes\MyScript.pwn(1392) : error 029: invalid expression, assumed zero
C:\Users\Administration\Desktop\My Script\gamemodes\MyScript.pwn(1392) : fatal error 107: too many error messages on one line
By the way I'm trying to get this from my filterscript and I need to know how to do it from my gamemode.
Re: Show Players Rank Once They Join Server (ZCMD) -
Cxnnor - 05.08.2012
pawn Код:
public OnPlayerSpawn(playerid)
{
new string[128]
format(string, sizeof(string), "%s has joined the server, his rank is %d.", PlayerName, PlayerRank);
SendClientMessageToAll(COLOR_GREY, string);
GivePlayerWeapon(playerid,27,1000);
GivePlayerWeapon(playerid,25,1000);
GivePlayerWeapon(playerid,28,1000);
GivePlayerWeapon(playerid,34,500);
GivePlayerWeapon(playerid,24,500);
return 1;
}
Re: Show Players Rank Once They Join Server (ZCMD) -
Misiur - 05.08.2012
Remote function works only if there is remote function. You had it in FS (as of last thread). Now you don't have it at all - you must either port the function to gamemode, or I don't know.
Re: Show Players Rank Once They Join Server (ZCMD) -
Eminem 2ka9 - 05.08.2012
k thanks anyway