Help with script -
icko202 - 10.02.2013
How can i make every class to have different colors and different weapons?
Re: Help with script -
Mean - 10.02.2013
pawn Код:
public OnPlayerRequestClass(playerid, classid) {
switch(classid) {
case 0: // set color for class 0
case 1: // set color for class 1
// etc
}
return 1;
}
Re: Help with script -
icko202 - 10.02.2013
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,220.3261,1822.9734,7.536

;//The Place postion
SetPlayerCameraLookAt(playerid,220.3261,1822.9734, 7.536

;//Camera Look at the player
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4 141);//Camera Postiion
SetPlayerFacingAngle(playerid, 270 );//The Facing Angle
if(GetPlayerSkin(playerid) == 285)
{
GameTextForPlayer(playerid, "~b~SWAT", 1000, 4);
}
else if(GetPlayerSkin(playerid) == 294)
{
GameTextForPlayer(playerid, "~r~Mafia", 1000, 4);
}
switch(classid) {
case 0:SetPlayerColor(playerid, 0xFF0000AA);
case 1:SetPlayerColor(playerid, 0x0000BBAA);
return 1;
}
Errors:
C:\Users\DELL\Desktop\TDM 1.1\gamemodes\TDM.pwn(74) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\DELL\Desktop\TDM 1.1\gamemodes\TDM.pwn(74) : warning 215: expression has no effect
Re: Help with script -
Mean - 10.02.2013
pawn Код:
public OnPlayerRequestClass(playerid, classid) {
SetPlayerPos(playerid,220.3261,1822.9734,7.536;//The Place postion
SetPlayerCameraLookAt(playerid,220.3261,1822.9734, 7.536;//Camera Look at the player
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4 141);//Camera Postiion
SetPlayerFacingAngle(playerid, 270 );//The Facing Angle
if(GetPlayerSkin(playerid) == 285) {
GameTextForPlayer(playerid, "~b~SWAT", 1000, 4);
SetPlayerColor(playerid, 0xFF0000AA);
}
else if(GetPlayerSkin(playerid) == 294) {
GameTextForPlayer(playerid, "~r~Mafia", 1000, 4);
SetPlayerColor(playerid, 0x0000BBAA);
}
return 1;
}
Re: Help with script -
icko202 - 10.02.2013
how can i made when i kill someone to show on the right?
Re: Help with script -
Blast3r - 10.02.2013
Quote:
Originally Posted by icko202
how can i made when i kill someone to show on the right?
|
What do you mean exactly mate?
Re: Help with script -
icko202 - 10.02.2013
in the gang wars servers when you kill someone it shows on the right your name killed the person with what weapon
Re: Help with script -
Apenmeeuw - 10.02.2013
https://sampwiki.blast.hk/wiki/SendDeathMessage
pawn Код:
SendDeathMessage(killerid, playerid, reason);
Re: Help with script -
Blast3r - 10.02.2013
Find this in your PAWNO:
Код:
public OnPlayerDeath(playerid, killerid, reason)
And then do this:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
return 1;
}
So if you already got other codes onplayerdeath, just add that SendDeathMessage at top, before others.
Good luck.