13.04.2012, 08:39
Okay i am working on a TDM Gamemode anyway i followed a tutorial to make a killer streak but i got errors i can't fix here is the command
Errors :
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID ) {
if(GetPlayerWantedLevel(killerid) < 6)
{
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
}
Streaks[killerid] ++;
GivePlayerMoney(killerid, 500);
}
SetPlayerWantedLevel(playerid, 0);
Streaks[playerid] = 0;
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
new str[ 256 ], KillerName[MAX_PLAYER_NAME];
GetPlayerName(killerid, KillerName, sizeof(KillerName));
switch(Streaks[killerid])
{
case 2:
{
format(str, sizeof(str), "[KILLINGSPREE] ~g~%s has performed a ~y~double kill!", KillerName);
GameTextForAll(str,4000,4);
}
case 3:
{
format(str, sizeof(str), "[KILLINGSPREE] ~y~Triple Kill for ~b~%s!", KillerName);
GameTextForAll(str,4000,4);
}
case 4:
{
format(str, sizeof(str), "[KILLINGSPREE] ~p~Quadro Kill for ~r~%s!", KillerName);
GameTextForAll(str,4000,4);
}
case 5:
{
format(str, sizeof(str), "[KILLINGSPREE] ~r~%s is dominating with ~p~five kills!", KillerName);
GameTextForAll(str,4000,4);
}
case 6:
{
format(str, sizeof(str), "[KILLINGSPREE] ~w~%s is godlike with ~y~six kills!", KillerName);
GameTextForAll(str,4000,4);
}
case 7:
{
format(str, sizeof(str), "[KILLINGSPREE] ~r~RAMPAGE for %s with ~w~seven kills!", KillerName);
GameTextForAll(str,4000,4);
}
case 8:
{
format(str, sizeof(str), "[KILLINGSPREE] ~p~%s is unbelievable with ~y~eight kills!", KillerName);
GameTextForAll(str,4000,4);
}
case 9:
{
format(str, sizeof(str), "[KILLINGSPREE] ~g~%s is worldclass, ~b~nine kills!", KillerName);
GameTextForAll(str,4000,4);
}
case 10:
{
format(str, sizeof(str), "[KILLINGSPREE] ~b~%s is annihilating with ~g~ten kills!", KillerName);
GameTextForAll(str,4000,4);
}
return 1;
}
Quote:
C:\Documents and Settings\Solution_\Desktop\Windows Sa-mp Server\gamemodes\TDM.pwn(124) : warning 217: loose indentation C:\Documents and Settings\Solution_\Desktop\Windows Sa-mp Server\gamemodes\TDM.pwn(127) : warning 217: loose indentation C:\Documents and Settings\Solution_\Desktop\Windows Sa-mp Server\gamemodes\TDM.pwn(157) : warning 217: loose indentation C:\Documents and Settings\Solution_\Desktop\Windows Sa-mp Server\gamemodes\TDM.pwn(179) : error 002: only a single statement (or expression) can follow each "case" C:\Documents and Settings\Solution_\Desktop\Windows Sa-mp Server\gamemodes\TDM.pwn(179) : warning 215: expression has no effect |